首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在中运行.sh脚本

如何在中运行.sh脚本
EN

Stack Overflow用户
提问于 2022-10-17 18:38:04
回答 1查看 86关注 0票数 0

在Windows环境下,在Intellij中运行sh文件有问题。

当我单击文件中的run按钮时,得到了如下所示的输出。

代码语言:javascript
运行
复制
PS C:\Users\username\IdeaProjects\library> /bin/sh C:/Users/username/IdeaProjects/library/aws-setup.sh
/bin/sh : The term '/bin/sh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify t
hat the path is correct and try again.
At line:1 char:1
+ /bin/sh C:/Users/username/IdeaProjects/library/aws-setup.sh
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (/bin/sh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

我怎么才能修好它?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-10-17 18:54:35

设置设置(macOS上的首选项),用c:\Program Files\Git\bin\bash.exe或使用Shell脚本运行配置,解释器路径设置为bash.exe

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74101727

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档