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.txt
There 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?
---------- Post updated at 05:35 AM ---------- Previous update was at 05:31 AM ----------
#!/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