- 1. Created a new file in my home directory:
- cd ~
- touch rset
- chmod 777 rset
- 2. Edit the file and add the following:
- #! /bin/bash
- cd /opt
- 3. Make the file executable
- chmod +x rset
- 4. Run the script from my home directory:
- me@me:~$ ./rset
- When I run that script the directory does not change and I'm simply presented with another command prompt in the same location.
SHARE
TWEET
Untitled
a guest
Sep 17th, 2015
70
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
