Logo 
Search:

Unix / Linux / Ubuntu Answers

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

  
Question Answered By: Adah Miller   on Nov 30

If you source the script instead of executing it, it will remain in that
directory.

instead of "sh myscript.sh" or ./myscript.sh

do

. myscript.sh or source myscript.sh

Share: 

 

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

 
Didn't find what you were looking for? Find more on Changing directories in a script Or get search suggestion and latest updates.


Tagged: