Skip to content

Latest commit

 

History

History
6 lines (3 loc) · 314 Bytes

File metadata and controls

6 lines (3 loc) · 314 Bytes

Run cd in a shell script

The cd is done within the script's shell. When the script ends, that shell exits, and then you are left in the directory you were. So you run script . yourscript.sh by adding ..

Reference: http://stackoverflow.com/a/2236614/1146834