I created a script for cygwin and set a shortcut as explained in the end of this tutorial.
Altough, my script has to receive variable parameters and the way it was set either it runs as if no parameters were passed or if I set anything after the script path it considers it as literal parameter.
Consider a script (echo.sh) like this:
#!/bin/bash echo "this"$1 sleep 30
The target in my shortcut:
C:\cygwin64\bin\bash.exe --login -i '/cygdrive/c/cygwin64/echo.sh'
When I click in the shortcut it already prints 'this' and sleeps. I tried:
C:\cygwin64\bin\bash.exe --login -i '/cygdrive/c/cygwin64/echo.sh $1' #file not found C:\cygwin64\bin\bash.exe --login -i '/cygdrive/c/cygwin64/echo.sh' $1 #prints 'this$1'