Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@localhost bash-scripting]# history
- 1 dnf install git -y
- 2 git clone https://github.com/sandervanvugt/bash-scripting
- 3 cd bash-scripting/
- 4 ls
- 5 env
- 6 echo $USER
- 7 key=value
- 8 echo $value
- 9 echo $key
- 10 export key=value
- 11 bash
- 12 vim /etc/bashrc
- 13 echo ${key}
- 14 echo ${key}1
- 15 echo $key1
- 16 ls
- 17 echo $?
- 18 ls ugiugiuguyguy
- 19 echo $?
- 20 echo $SHELL
- 21 vim example1
- 22 chmod +x example1
- 23 ./example1
- 24 vim /etc/bashrc
- 25 example1
- 26 echo $PATH
- 27 ./example1
- 28 vim hello-world.sh
- 29 bash hello-world.sh
- 30 hello-world.sh
- 31 ./hello-world.sh
- 32 ls -l hello-world.sh
- 33 chmod +x hello-world.sh
- 34 ./hello-world.sh
- 35 hello-world.sh
- 36 echo $PATH
- 37 cp hello-world.sh /usr/bin/
- 38 hello-world.sh
- 39 type ls
- 40 type man
- 41 type cat
- 42 type echo
- 43 help
- 44 man bash
- 45 ls
- 46 cat script2
- 47 ./countdown 12
- 48 cat countdown
- 49 echo "this is my $SHELL"
- 50 echo 'this is my $SHELL'
- 51 echo this is my \$SHELL
- 52 echo the value of $SHELL is $SHELL
- 53 echo the value of \$SHELL is $SHELL
- 54 ls
- 55 vim readtit
- 56 ./readtit
- 57 chmod +x readtit
- 58 ./readtit
- 59 pwd
- 60 echo hello >&2
- 61 vim press.sh
- 62 chmod +x press.sh
- 63 ./press.sh
- 64 cat press.sh
- 65 vim colors.sh
- 66 chmod +x colors.sh
- 67 ./colors.sh
- 68 vim variables
- 69 vim colors.sh
- 70 ./colors.sh
- 71 vim colors.sh
- 72* . colors.sh
- 73 vim script2
- 74 history
- 75 . script2
- 76 dnf install network-scripts
- 77 cd
- 78 cd bash-scripting/
- 79 ls
- 80 scp root@192.168.29.149:/etc/rc.d/init.d/network .
- 81 vim network
- 82 vim script3
- 83 cat script3
- 84 ./script3 a b c d e f g h i j k k l m n
- 85 chmod +x script*
- 86 ./script3 a b c d e f g h i j k k l m n
- 87 cat script3
- 88 vim script4
- 89 ./script4 a b c d
- 90 cat script4
- 91 vim script4b
- 92 chmod +x script4b
- 93 ./script4b lisa linda lori
- 94 cat script4b
- 95 vim countdown
- 96 echo $(( 2 + 5 ))
- 97 echo $(( 2 * 5 ))
- 98 vim countdown
- 99 ./countdown 1
- 100 vim countdown
- 101 ./countdown 1
- 102 date +%d-%m-%y
- 103 today=$(date +%d-%m-%)
- 104 echo %today
- 105 echo $today
- 106 today=$(date +%d-%m-%y)
- 107 echo $today
- 108 touch /tmp/backup-$(date +%d-%m-%y)
- 109 uname -r
- 110 cd /usr/lib/modules
- 111 ls
- 112 cd `uname -r`
- 113 cd ..
- 114 cd $(uname -r)
- 115 cd ..
- 116 cd
- 117 cd bash-scripting/
- 118 ./countdown 12
- 119 vim countdown
- 120 ./countdown 12
- 121 dnf install vsftpd lftp
- 122 systemctl start vsftpd
- 123 lftp localhost
- 124 vim /etc/vsftpd/vsftpd.conf
- 125 setenforce 0
- 126 systemctl restart vsftpd
- 127 lftp localhost
- 128 vim herescript
- 129 chmod +x herescript
- 130 ./herescript
- 131 vim setupftp
- 132 ./setupftp
- 133 ls
- 134 vim script6
- 135 ./script6 /usr/bin/blah
- 136 vim script6
- 137 ./script6 /usr/bin/blah
- 138 vim script7
- 139 ./script7
- 140 echo $(( 5 / 2 ))
- 141 echo $(( 5 * 2 ))
- 142 echo $(( 5 - 2 ))
- 143 echo $(( 5 % 2 ))
- 144 history
- 145 type test
- 146 man test
- 147 history
- 148 if [ -f /etc/hosts ]; then echo file exists; fi
- 149 if [ -f /etc/hoguygfuyfg ]; then echo file exists; fi
- 150 if true; then echo file exists; fi
- 151 if false; then echo file exists; fi
- 152 false
- 153 echo $?
- 154 true
- 155 echo $?
- 156 [ -f /etc/hosts ] && echo it exists
- 157 [ -f /etc/hff ] && echo it exists
- 158 [ -f /etc/hff ] || echo it not exists
- 159 [ -f /etc/hosts ] || echo it not exists
- 160 vim testscript
- 161 chmod +x testscript
- 162 ./testscript
- 163 chmod +x testscript /etc
- 164 chmod +x testscript /uguguiguigui
- 165 bash -x testscript
- 166 [ -x ]
- 167 echo $?
- 168 [ -x /etc ]
- 169 echo $?
- 170 [ -d /etc ]
- 171 echo $?
- 172 [ -d /ec ]
- 173 echo $?
- 174 vim testscript
- 175 ./testscript
- 176 ./testscript /etc
- 177 ./testscript /guguguyfguy
- 178 vim testscript
- 179 mkdir /false
- 180 chmod 444 /false
- 181 ./testscript /false
- 182 ls -ld /false
- 183 man test
- 184 [ -z $banana ] || echo no bananas
- 185 [ -z $banana ] && echo no bananas
- 186 ./countdown 12
- 187 ls
- 188 vim script10
- 189 vim greater
- 190 chmod +x greater
- 191 ./greater
- 192 vim greater
- 193 ./greater
- 194 vim greater
- 195 vim else1
- 196 vim else2
- 197 vim numcheck
- 198 ./numcheck
- 199 vim numcheck
- 200 strace -c ./numcheck
- 201 vim numcheck
- 202 strace -c ./numcheck
- 203 time ls
- 204 time echo *
- 205 ls
- 206 vim for
- 207 grep for *
- 208 vim lab6.sh
- 209 for i in *sh; do echo $i has sh extension; done
- 210 vim rename.sh
- 211 chmod +x rename.sh
- 212 ./rename.sh
- 213 mkdir spaces
- 214 touch one
- 215 touch 'one two'
- 216 touch three
- 217 ls
- 218 cd space
- 219 cd spaces
- 220 mv ../one* .
- 221 mv ../three .
- 222 for i in *; do echo $i; done
- 223 for i in *; do echo mv $i $i.bak; done
- 224 for i in *; do mv $i $i.bak; done
- 225 ls
- 226 touch one
- 227 touch three
- 228 rm *bak
- 229 for i in *; do mv "$i" "$i.bak"; done
- 230 ls
- 231 grep case *
- 232 cd ..
- 233 grep case *
- 234 vim script12
- 235 ./script12
- 236 vim network
- 237 vim convert
- 238 vim backout
- 239 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement