如何通过运行在Cygwin的Windows 7的sh文件? [英] How to run .sh file on Windows 7 through Cygwin?
问题描述
我要对我的 Windows上使用包7 OS但是包只来了 .SH
文件,所以我必须使用bash因此Cygwin来我的机器上运行。
I have to use a package on my Windows 7 OS but the package comes only with the .sh
file so I have to use bash and hence Cygwin to run on my machine.
不过,我还挺熟悉Windows,但完全新的Cygwin和shell编程。
But I am kinda familiar with Windows but completely new to Cygwin and shell programming.
假设我有一个 run.sh
文件中的 / cygdrive / C /用户/ MyUserName输入/桌面/软件/ mypackage的/ bin中
,我应该如何在Cygwin中运行呢?
Suppose I have a run.sh
file in /cygdrive/c/Users/myUserName/Desktop/software/myPackage/bin
, how should I run it in Cygwin?
下载Cygwin和在终端我浏览到该目录,然后键入 run.sh
进入,但它抱怨
Downloaded Cygwin and in the terminal I navigate to that directory and type run.sh
enter but it complains
$ run.sh
-bash: run.sh: command not found
我问这个,因为我大致明白在Windows中你可以直接导航到该目录,然后运行的.bat
的文件,这就是它?
这是如何工作的Cygwin的?任何建议是高度AP preciated!
How does this work for Cygwin? Any suggestion are highly appreciated!
推荐答案
您可以运行它:
bash run.sh
不然:
chmod +x run.sh
./run.sh
这篇关于如何通过运行在Cygwin的Windows 7的sh文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!