如何在Windows 7命令提示符下运行.sh ?当我试着在里面运行这一行的时候总是会得到这个错误,
app/build/build.sh
错误,
'app' is not recognized...
or,
bash app/build/build.sh
错误,
'bash' is not recognized...
知道我错过了什么吗?
这里是截屏,
如何在Windows 7命令提示符下运行.sh ?当我试着在里面运行这一行的时候总是会得到这个错误,
app/build/build.sh
错误,
'app' is not recognized...
or,
bash app/build/build.sh
错误,
'bash' is not recognized...
知道我错过了什么吗?
这里是截屏,
当前回答
只要安装git,然后通过bash <name.sh>"运行你的.sh文件。
其他回答
Windows中的新功能-在Windows的ubuntu上运行bash -在Build会议后的Windows 10“Insiders”版本中可用:
https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/
只要安装git,然后通过bash <name.sh>"运行你的.sh文件。
在Windows操作系统下安装github工具。在安装Git的环境变量“System”中设置如下路径。
<程序文件在C:\>\Git\bin
<程序文件在C:\>\Git\usr\bin
在cmd窗口中键入'sh'重定向到Bourne shell并在终端中运行您的命令。
在Windows 10周年更新中,在ubuntu上运行shell命令甚至更容易
我试图为我的x-wrt r7000 netgear路由器设置我的区域,我发现以下对我有用,在windows上使用ubuntu上的bash,你必须启用在windows功能中找到的子系统,并开启开发模式
ssh admin@192.168.1.1 < /mnt/c/ccode-eu.sh
运行.sh文件最常见的方法是使用sh命令:
C:\>sh my-script-test.sh
另一个好的选择是安装CygWin
在Windows中,家庭位于:
C:\cygwin64\home\[user]
例如,我使用bash命令执行my-script-test.sh文件:
jorgesys@INT024P ~$ bash /home/[user]/my-script-test.sh