Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i start Mintty and run a script file?

Tags:

curl

cmd

mintty

I wrote a simple CURL and put it in a script file.

if i run mintty first and then "test.sh" it runs the script in the file just fine. Works perfectly.

however, if i try to run mintty with any of the following command line, it will not run. I'm running these in CMD

C:\>c:\cygwin\bin\mintty.exe --exec '/cygdrive/c/cygwin/bin/test.sh'

C:\>c:\cygwin\bin\mintty.exe --exec '/bin/test.sh'

C:\>c:\cygwin\bin\mintty.exe --exec '/test.sh'

C:\>c:\cygwin\bin\mintty.exe --exec 'test.sh'

C:\>c:\cygwin\bin\mintty.exe --exec 'c:/test.sh'

C:\>c:\cygwin\bin\mintty.exe --exec 'c:\test.sh'
like image 614
nkman Avatar asked Apr 12 '13 17:04

nkman


1 Answers

For whoever is interested in this... here is the solution

Create a shortcut in windows for mintty with the following target

Assuming your shell file is located in c:\cygwin\bin

C:\cygwin\bin\mintty.exe /bin/bash -l -e '/cygdrive/c/cygwin/bin/test.sh'
like image 196
nkman Avatar answered Oct 06 '22 18:10

nkman