nkm*_*man 7 windows cygwin batch-file mintty
我目前在我的捷径下有这个
C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -
在那之后运行我必须输入
cd x:ENTER
然后我运行一个curl不会改变的脚本.
我尝试通过运行以下命令来自动化它,但它似乎不起作用
我的SH文件
#!/bin/bash
cd x:
curl http://thedomain.com/update.json --connect-timeout 10000 --max-time 10000 --data-binary @jsonfilename -H 'Content-type:application/json;charset=utf-8;X-Vendor-Email=myemail@.com;'
Run Code Online (Sandbox Code Playgroud)
这就是我在CMD中运行的内容
mintty.exe --exec 'c:/cygwin/bin/test.sh'
Run Code Online (Sandbox Code Playgroud)
cygwin弹出2秒钟然后消失.
请帮忙
更新
新错误
$ /bin/test.sh
0 [main] bash 12000 child_info_fork::abort: cygreadline7.dll: Loaded to different address: parent(0x3B0000) != child(0x320000)
/bin/test.sh: fork: retry: Resource temporarily unavailable
0 [main] bash 12052 child_info_fork::abort: cygreadline7.dll: Loaded to different address: parent(0x3B0000) != child(0x2B0000)
/bin/test.sh: fork: retry: Resource temporarily unavailable
0 [main] bash 9304 child_info_fork::abort: cygreadline7.dll: Loaded to different address: parent(0x3B0000) != child(0x3A0000)
/bin/test.sh: fork: retry: Resource temporarily unavailable
0 [main] bash 9036 child_info_fork::abort: cygreadline7.dll: Loaded to different address: parent(0x3B0000) != child(0x3A0000)
/bin/test.sh: fork: retry: Resource temporarily unavailable
0 [main] bash 9588 child_info_fork::abort: cygreadline7.dll: Loaded to different address: parent(0x3B0000) != child(0x3C0000)
/bin/test.sh: fork: Resource temporarily unavailable
Run Code Online (Sandbox Code Playgroud)
对于谁对此感兴趣..这里是解决方案
使用以下taret在Windows中为Mintty创建一个快捷方式
假设您的shell文件位于c:\ cygwin\bin中
C:\ cygwin\bin\mintty.exe/bin/bash -l -e'/cygdrive/c/cygwin/bin/test.sh'
一旦你有了快捷方式,你可以做一个Windows任务调度程序并从那里获取它.
Windows 7 Pro:使用Windows任务计划程序创建基本任务以启动DAILY并完成所有步骤.创建任务后,转到"属性",然后转到"TRIGGERS"选项卡并单击"编辑"
在ADVANCED SETTINGS框架下,你将重复任务....从那里不言自明.
| 归档时间: |
|
| 查看次数: |
10744 次 |
| 最近记录: |