从Windows PowerShell运行bash脚本 [英] Run bash script from Windows PowerShell

查看:753
本文介绍了从Windows PowerShell运行bash脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在cygwin中,我只能执行./script.sh参数,但这会在PowerShell中的记事本中打开脚本文件.

In cygwin, I could just do ./script.sh args, but this opens the script file in notepad in PowerShell.

我需要执行什么操作?

推荐答案

您应该将脚本作为运行的* NIX shell的参数,等效于* NIXish

You should put the script as argument for a *NIX shell you run, equivalent to the *NIXish

sh myscriptfile

这篇关于从Windows PowerShell运行bash脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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