Logo 
Search:

Unix / Linux / Ubuntu Answers

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds
  on Dec 14 In Unix / Linux / Ubuntu Category.

  
Question Answered By: Adah Miller   on Dec 14

When the bash script exits, you're back where you started because the
process executing the script terminated. :-)

The "cd ~/avr" does work in the script; add a "pwd" between that and
the "exit 0" to reassure yourself.

If you want to actually remain in ~/avr when the script finishes,
remove the "exit 0" and start the script per "source scriptname"
or ". scriptname" (noting there's a space between the "." and the
scriptname.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Script that will CD, change directory Or get search suggestion and latest updates.


Tagged: