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

I'll repeat for those of you that did not understand the first time . . .

How do you change directories and stay in that directory after the script
ends?

A few years back I basically ask the same question and received an answer
that did work

While the script that dies no longer has a current directory the directory
it was in when the script ended is still there. How do I get the script to
leave the terminal session in the directory it had changed to? I don't know
what I'm saying wrong that you can't grasp that?

The reason I want to do this is I have a C code directory whose path is
quite long and want to create a script that can be executed that will take
terminal there, end and be in that directory after the script ends. The path
is something like ~/atmel/avr tools/avrstudio4/code/m8515/sw-led. So with a
script by the name of m8515sw-led.sh that took me to that directory and left
me there would sure help me from fat-fingering the path.

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: