Start New Discussion Reply to this Discussion Run .exe inside shell script
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
Related Article: Replace String in a C Shell Script
is a solved Shell Scripting discussion thread by msrikanth that has 9 replies, was last updated 1 year ago and has been tagged with the keywords: awk, script, sed, string, unix.
Leela2403
Newbie Poster
1 post since Jan 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page rendered in 0.0534 seconds
using 2.65MB