sandervanvugt

ITGG bash scripting 1

Nov 25th, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. [student@localhost bash-scripting]$ cat script2b
  2. #!/bin/bash
  3.  
  4. . colors
  5.  
  6. echo the color is $COLOR
  7. [student@localhost bash-scripting]$ cat colors
  8. COLOR=pink
  9. [student@localhost bash-scripting]$
  10.  
  11. [student@localhost bash-scripting]$ cat script9b
  12. #!/bin/bash
  13.  
  14. [ -z $1 ] && echo you have to provide an argument && exit 11
  15.  
  16. echo the argument is $1
  17.  
  18. [ -f $1 ] && echo it\'s a file || echo $1 is not a file
  19.  
  20. #######
  21.  
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment