This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Calling another shell script with relative path problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Calling another shell script with relative path problem" Watch "Calling another shell script with relative path problem" New topic
Author

Calling another shell script with relative path problem

Sujoy Choudhury
Ranch Hand

Joined: Sep 17, 2008
Posts: 136

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?

Thanks and Regards,
~Sujoy
Sujoy Choudhury
Ranch Hand

Joined: Sep 17, 2008
Posts: 136

resolved this issue by implementing pushd and popd functions
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Calling another shell script with relative path problem
 
It's not a secret anymore!