I have a sh / bash script that should call a batch file with parameters (parameters are file names and are specified in DOS / Windows format).
Basically me: script.sh
#!/bin/sh declare var1=$1 declare var2=$2 dosomething var1 var2 ... <invoke batch script> var1 var2 ... dosomethingelse
I am using GNU bash, version 3.1.0(3)-release (i686-pc-msys) as a shell, on msysgit
The problem is that when I run from a script: $COMSPEC /c batchfile param1 param2 either I get a "blank prompt" that looks like bash, but the command result does not appear on the console, or cmd.exe start but does not execute the script .
I tried referencing params on bash like this:
$COMSPEC /c \"batchfile param1 param2\" $COMSPEC /c \"\"batchfile param1 param2\"\" $COMSPEC /c \"\"batchfile \"param1\" \"param2\"\"\"
But I did not get any result.
msysgit bash cmd batch-file
Bogdan maxim
source share