Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@localhost bash-scripting]# cat script2b
- #!/bin/bash
- . colors
- echo the color is $COLOR
- [root@localhost bash-scripting]# cat colors
- COLOR=red
- [root@localhost bash-scripting]# cat script4b
- #!/bin/bash
- for i in "$@"
- do
- echo useradd $i
- done
- root@localhost bash-scripting]# cat script9b
- #!/bin/bash
- #
- # documentation
- # exit code 3 means no argument provided
- if [ -z $1 ]
- # if test -z $1
- then
- echo please enter a value
- read VALUE
- else
- VALUE=$1
- fi
- echo the argument is $VALUE
- [root@localhost bash-scripting]# cat script11
- #!/bin/bash
- echo are you good?
- read GOOD
- GOOD=$(echo $GOOD | tr [:upper:] [:lower:])
- case $GOOD in
- yes)
- echo that\'s nice
- ;;
- no)
- echo that\'s not so nice
- ;;
- *)
- echo okay
- ;;
- esac
- scripting/
- 3 ls
- 4 vim script1
- 5 script1
- 6 echo $PATH
- 7 exit
- 8 echo $PATH
- 9 ./script1
- 10 cd bash-scripting/
- 11 ./script1
- 12 ls -l
- 13 chmod +x script1
- 14 ./script1
- 15 cat script1
- 16 ls -l script1
- 17 echo $?
- 18 ls kiwhgiughwiurghv
- 19 echo $?
- 20 ./script1
- 21 bash script1
- 22 sh script1
- 23 cat script1
- 24 history
- 25 chmod -x script1
- 26 bash script1
- 27 ./script1
- 28 chmod +x script1
- 29 sh script1
- 30 which sh
- 31 which bash
- 32 ls -l /usr/bin/sh /usr/bin/bash
- 33 vim script2
- 34 ./script2
- 35 chmod +x script*
- 36 ./script2
- 37 cat script2
- 38 pwd
- 39 vim script2
- 40 source script2
- 41 ls
- 42 cd bash-scripting/
- 43 vim script2
- 44 source script2
- 45 cd bash-scripting/
- 46 source script2
- 47 cd -
- 48 . script2
- 49 cd -
- 50 vim script2b
- 51 chmod +x script2b
- 52 vim colors
- 53 ./script2b
- 54 chmod +x script2b
- 55 vim script2b
- 56 vim colors
- 57 ./script2b
- 58 yum provides */network
- 59 yum provides */network | grep init.d
- 60 yum provides */network | grep -B 4 init.d
- 61 yum install -y network-scripts
- 62 cat script2b
- 63 cat colors
- 64 cat script2
- 65 history
- 66 cd /etc/init.d/
- 67 ls
- 68 vim network
- 69 ls
- 70 pwd
- 71 cd /etc/sysconfig/
- 72 ls
- 73 vim network
- 74 cd /root/bash-scripting/
- 75 ./countdown 12
- 76 cat script2
- 77 cat script2b
- 78 cat colors
- 79 vim countdown
- 80 echo $(( 2 + 2 ))
- 81 echo $(( 2 * 42 ))
- 82 echo $(( 42 /2 ))
- 83 vim script3
- 84 cat script3
- 85 ./script3 a b c d e f g h i j k l m
- 86 sleep 5; echo hello
- 87 vim script4
- 88 cat script3
- 89 vim script4
- 90 vim ~/.vimrc
- 91 vim script4
- 92 ./script4 a b c d e
- 93 vim script4b
- 94 chmod +x script4b
- 95 ./script4b bob bill bea
- 96 vim script4b
- 97 ./script4b bob bill bea
- 98 cat script4
- 99 cat script4b
- 100 vim script3
- 101 ./script3 a b c
- 102 vim script3
- 103 vim script5
- 104 cd /lib/modules
- 105 ls
- 106 uname -r
- 107 cd `uname -r`
- 108 cd ..
- 109 cd $(uname -r)
- 110 which vim
- 111 ls -l /usr/bin/vim
- 112 ls -l $(which vim)
- 113 cd
- 114 cd bash-scripting/
- 115 vim script5
- 116 vim script6
- 117 cat script6
- 118 ./script6 /usr/bin/blah
- 119 vim script6
- 120 ./script6 /usr/bin/blah
- 121 vim script6
- 122 MYNAME="sander van vugt"
- 123 echo $MYNAME
- 124 MYPATH="$PATH"
- 125 echo $MYPATH
- 126 echo 'uname -r'
- 127 echo `uname -r`
- 128 vim script6
- 129 vim script7
- 130 ./script7
- 131 vim script7
- 132 vim script8
- 133 cut -d : -f 1 /etc/passwd
- 134 vim script8
- 135 vim grepfile
- 136 grep alex grepfile
- 137 grep xander grepfile
- 138 grep ^alex$ grepfile
- 139 useradd linda
- 140 useradd belinda
- 141 useradd melinda
- 142 grep linda /etc/passwd
- 143 grep ^linda$ /etc/passwd
- 144 cut -d : -f 1 /etc/passwd | grep ^linda$ /etc/passwd
- 145 cut -d : -f 1 /etc/passwd | grep ^linda$
- 146 vim script8
- 147 ./script8
- 148 vim script8
- 149 ./script8 linda
- 150 ./script8 inda
- 151 vim script8
- 152 cat script8
- 153 cut -d : -f /etc/passwd | grep ^linda$ >/dev/null && echo she exists || echo she doesnt exist
- 154 cut -d : -f 1 /etc/passwd | grep ^linda$ >/dev/null && echo she exists || echo she doesnt exist
- 155 cut -d : -f 1 /etc/passwd | grep ^pinda$ >/dev/null && echo she exists || echo she doesnt exist
- 156 cat script8
- 157 (cut -d : -f 1 /etc/passwd | grep ^pinda$ >/dev/null && echo she exists) || echo she doesnt exist
- 158 (cut -d : -f 1 /etc/passwd | grep ^linda$ >/dev/null && echo she exists) || echo she doesnt exist
- 159 grep ^alex$ grepfile
- 160 grep ^linda$ /etc/passwd
- 161 vim script8 script8b
- 162 vim script8b
- 163 cp script8 script8b
- 164 vim script8b
- 165 ./script8b linda
- 166 vim script9
- 167 man test
- 168 vim script9
- 169 ./script9
- 170 echo $?
- 171 ./script9 yes
- 172 cp script9 script9b
- 173 vim script9b
- 174 cat script9b
- 175 vim script10
- 176 ./script10 1
- 177 bash -x ./script10 1
- 178 vim script10
- 179 bash -x ./script10 1
- 180 vim script10
- 181 bash -x ./script10 1
- 182 vim script10
- 183 ./script10 1
- 184 ./script10 12
- 185 ls
- 186 vim script10
- 187 vim script11
- 188 ./script11
- 189 vim script11
- 190 ./script11
- 191 vim script11
- 192 echo HELLO | tr [:upper:][:lower:]
- 193 echo HELLO | tr [:upper:] [:lower:]
- 194 echo HELLO | tr A-Z a-z
- 195 vim script11
- 196 ./script11
- 197 cat script11
- 198 ls
- 199 vim kube-setup.sh
- 200 echo here document
- 201 ls
- 202 vim lab53.sh
- 203 vim lab97.sh
- 204 vim rene
- 205 vim script11
- 206 vim rene
- 207 file scripts
- 208 vim vbox-setup.sh
- 209 cd ..
- 210 git clone https://github.com/sandervanvugt/kube4h
- 211 git clone https://github.com/sandervanvugt/kub4h
- 212 cd kub4h/
- 213 ls
- 214* vim kube-setup.s
- 215 cd ..
- 216 git clone https://github.com/sandervanvugt/kubernetes
- 217 cd kubernetes/
- 218 vim kube-setup.sh
- 219 hostnamectl
- 220 vim kube-setup.sh
- 221 cd
- 222 history
Add Comment
Please, Sign In to add comment