Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. ```
  2. $ touch script.sh
  3.  
  4. $ atom script.sh
  5.  
  6. $ sh script.sh
  7. Hello, world!
  8.  
  9. $ ./script.sh
  10. zsh: permission denied: ./script.sh
  11.  
  12. $ type chmod
  13. chmod is /bin/chmod
  14.  
  15. $ ls -l script.sh
  16. -rw-r--r-- 1 bc staff 21 23 Aug 15:56 script.sh
  17.  
  18. $ chmod 700 script.sh
  19.  
  20. $ ls -l script.sh
  21. -rwx------ 1 bc staff 21 23 Aug 15:56 script.sh
  22.  
  23. $ ./script.sh
  24. Hello, world!
  25.  
  26. $ chmod +x script.sh
  27.  
  28. $ ls -l script.sh
  29. -rwx--x--x 1 bc staff 21 23 Aug 15:56 script.sh
  30.  
  31. $ ./script.sh
  32. Hello, world!
  33. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement