Advertisement
sandervanvugt

bash-scripting april2021

Apr 1st, 2021
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. [student@localhost ~]$ history
  2. 1 cd bash-scripting/
  3. 2 ls
  4. 3 history
  5. 4 ls
  6. 5 vim script1
  7. 6 script1
  8. 7 echo $PATH
  9. 8 pwd
  10. 9 ./script1
  11. 10 ls -l script1
  12. 11 chmod +x script1
  13. 12 ./script1
  14. 13 history
  15. 14 vim script1
  16. 15 ./script1
  17. 16 echo $?
  18. 17 vim script1
  19. 18 ./script1
  20. 19 echo $?
  21. 20 vim script1
  22. 21 ./script1
  23. 22 echo $?
  24. 23 echo $GREET
  25. 24 env
  26. 25 GREET=hello world
  27. 26 GREET="hello world"
  28. 27 echo $GREET
  29. 28 nano script1
  30. 29 cd ..
  31. 30 git clone https://github.com/sandervanvugt/cool-bash
  32. 31 cd cool-bash/
  33. 32 ls
  34. 33 vim 1_cpu-hog
  35. 34 cd ../bash-scripting/
  36. 35 history
  37. 36 vim script2
  38. 37 ./script2
  39. 38 chmod +x scr*
  40. 39 ./script2
  41. 40 pwd
  42. 41 . script2
  43. 42 pwd
  44. 43 cd
  45. 44 cd bash-scripting/
  46. 45 chmod -x scrkipt2
  47. 46 chmod -x script2
  48. 47 ./script2
  49. 48 chmod +x script2
  50. 49 ./script2
  51. 50 ~/
  52. 51 chmod -x script2
  53. 52 bash script2
  54. 53 ./script2
  55. 54 chmod +x script2
  56. 55 chmod u+x script2
  57. 56 ls
  58. 57 ls script2
  59. 58 cd ~/
  60. 59 cd bash-scripting/
  61. 60 ~
  62. 61 echo $HOME
  63. 62 cd $HOME
  64. 63 cd $HOME/
  65. 64 sudo yum install network-scripts
  66. 65 ls /etc/init.d/
  67. 66 vim /etc/init.d/network
  68. 67 cd /etc/sysconfig/
  69. 68 ls
  70. 69 cd network-scripts/
  71. 70 ls
  72. 71 cat ifcfg-ens33
  73. 72 pwd
  74. 73 cd
  75. 74 cd bash-scripting/
  76. 75 ls
  77. 76 vim script2b
  78. 77 chmod +x script2b
  79. 78 ./script2b
  80. 79 vim color
  81. 80 ./script2b
  82. 81 vim script2b
  83. 82 ./script2b
  84. 83 vim color
  85. 84 ./script2b
  86. 85 ls
  87. 86 ./countdown 12
  88. 87 vim countdown
  89. 88 ./countdown 0
  90. 89 ls
  91. 90 vim script3
  92. 91 ./script3 a b c d e f g h i j k l m
  93. 92 cat script3
  94. 93 bash -xv script2
  95. 94 vim list
  96. 95 for i in $(cat list); do echo $i; done
  97. 96 vim script3
  98. 97 ./script3 a b c d e f g h i j k l m
  99. 98 vim script3
  100. 99 ./script3 a b c d e f g h i j k l m
  101. 100 vim script3
  102. 101 ./script3 a b c d e f g h i j k l m
  103. 102 vim script4
  104. 103 ./script4 a b c d e f g h
  105. 104 vim script4-users
  106. 105 chmod +x script4-users
  107. 106 ./script4-users bob bill ben
  108. 107 vim script4-users
  109. 108 ./script4-users bob bill ben
  110. 109 ./script4-users bob bill ben bea
  111. 110 vim script4-users
  112. 111 vim script4-users
  113. 112 vim script4-users
  114. 113 ./script4-users a b c d
  115. 114 vim script4-users
  116. 115 vim script5
  117. 116 cd /usr/lib
  118. 117 ls
  119. 118 cd modules
  120. 119 ls
  121. 120 uname -r
  122. 121 cd $(uname -r)
  123. 122 cd ..
  124. 123 cd `uname -r`
  125. 124 cd
  126. 125 cd bash-scripting/
  127. 126 vim script6
  128. 127 ./script6 /usr/bin/blah
  129. 128 vim script6
  130. 129 ./script6 /usr/bin/blah
  131. 130 vim script7
  132. 131 ./script7
  133. 132 vim script7
  134. 133 vim script8
  135. 134 cut -d : -f 1 /etc/passwd
  136. 135 vim script8
  137. 136 sudo useradd alexander
  138. 137 sudo useradd alex
  139. 138 ./script8 alex
  140. 139 ./script8 xander
  141. 140 ./script8 bob
  142. 141 vim script8
  143. 142 vim /etc/init.d/network
  144. 143 vim script8
  145. 144 ./countdown 4
  146. 145 vim gv.sh
  147. 146 chmod +x gv.sh
  148. 147 ./gv.sh beatrix
  149. 148 sudo ./gv.sh beatrix
  150. 149 vim script9
  151. 150 man test
  152. 151 vim countdown
  153. 152 vim script9
  154. 153 vim gv.sh
  155. 154 useradd kqkho
  156. 155 echo $?
  157. 156 sudo useradd student
  158. 157 echo $?
  159. 158 vim gv.sh
  160. 159 ./gv.sh kjhk
  161. 160 sudo useradd student
  162. 161 sudo ./gv.sh student
  163. 162 vim gv.sh
  164. 163 man test
  165. 164 ./countdown 12
  166. 165 vim gv.sh
  167. 166 sudo -i
  168. 167 cd bash-scripting/
  169. 168 vim reboot-test.sh
  170. 169 ./reboot-test.sh
  171. 170 sudo ./reboot-test.sh
  172. 171 ls -l /tmp/aft*
  173. 172 chvt 3
  174. 173 sudo chvt 3
  175. 174 history
  176.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement