This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling another shell script with relative path problem

 
Sujoy Choudhury
Ranch Hand
Posts: 136
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to execute a file (runFile.sh) from a different directory.
Inside 'runFile.sh' (which is not my code so I can't change this file) first few lines are like this:



So, when I try to call this file it is failing saying that 'env.sh' not found.
My Code:


Then I changed code like this.




When I run this file the cd command doesn't work.

How can I solve this problem?
 
Sujoy Choudhury
Ranch Hand
Posts: 136
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
resolved this issue by implementing pushd and popd functions
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic