1,105,633 Community Members

Run .exe inside shell script

Member Avatar
Leela2403
Newbie Poster
1 post since Jan 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I have to run some shell scripts in Windows using Cygwin. I am able to achieve that using %BASH% --login -i "/cygdrive/d/script.sh", where %BASH% is an environment variable in Windows set to C:\cygwin\bin\bash.exe.
I have a created a Cygwin environment variable $EXE_PATH = /cygdrive/d/somepath/dir. Inside my script the line is
$EXE_PATH/some.exe -f /cygdrive/d/password.txtThere is error in this line every time I run the script. Error is something to do with the some.exe/password.txt not being found.
If I run the same command from the Cygwin terminal, it works fine. Is there something wrong with the environemnt variable or the way exe is executed, because of its argrument list? is this the right way to execute an exe inside a shell script?

!/bin/sh

echo simple shell script
echo $EXE_PATH
$EXE_PATH/runube -f password.txt DVRP910 *ALL R0006P XJDE0001 QBATCH B #H S //NASRVNY/NY_02 --- this doesn't work
cat $TESTLEELA/password.txt --- this line works

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: