0
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'
Can you give an example of what you tried ? – matzeri – 2016-10-21T19:11:40.693
Shortcuts cannot use variable parameters. You should modify your script to ask for the values to use or read them from a file as appropriate. Note it is actually very unclear what you are actually trying to do. – DavidPostill – 2016-10-21T19:37:40.037
I've added details...so do I really need to change the script? – carla – 2016-10-21T20:04:28.630