我如何启动Mintty并运行脚本文件? [英] How do i start Mintty and run a script file?

查看:447
本文介绍了我如何启动Mintty并运行脚本文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个简单的CURL并将其放在脚本文件中。

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

如果我先运行mintty然后运行 test.sh,它将在文件中运行脚本正好。完美地工作。

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

但是,如果我尝试使用以下任何命令行运行mintty,它将无法运行。我正在CMD中运行这些程序

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'


推荐答案

对于对此感兴趣的人。 。这是解决方案

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

在Windows中为 mintty 创建一个快捷方式,目标如下:

Create a shortcut in windows for mintty with the following target

假设您的Shell文件位于c:\cygwin\bin

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'

这篇关于我如何启动Mintty并运行脚本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆