Advertisement
Guest User

Untitled

a guest
Sep 17th, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. 1. Created a new file in my home directory:
  2.  
  3. cd ~
  4. touch rset
  5. chmod 777 rset
  6.  
  7. 2. Edit the file and add the following:
  8.  
  9. #! /bin/bash
  10. cd /opt
  11.  
  12. 3. Make the file executable
  13.  
  14. chmod +x rset
  15.  
  16. 4. Run the script from my home directory:
  17.  
  18. me@me:~$ ./rset
  19.  
  20. When I run that script the directory does not change and I'm simply presented with another command prompt in the same location.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement