shell - 如何在powershell中运行cygwin脚本

标签 shell powershell cygwin

我正在尝试在 powershell 中运行 cygwin 脚本。我怎样才能做到这一点?

我尝试给出脚本的完整路径,然后是 args 。它不起作用
示例:/c/script/path/script args

最佳答案

使用 /cygdrive/c/script/path/scriptC:/script/path/script (注意大写 C 并且后面的路径没有前导斜线)。另外,需要使用正确的解释器运行脚本,例如:

& C:\cygwin\bin\bash.exe /cygdrive/c/script/path/script ...

关于shell - 如何在powershell中运行cygwin脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22959618/

相关文章:

bash - 将 shell 参数存储在文件中,同时保留引号

java - Shell 脚本调用 java 可执行文件并捕获异常

powershell - 如何列出位于不同服务器上的文件夹权限

powershell - PowerShell 2 模块中的类型

powershell - 八达通中的"The Azure PowerShell session has not been properly initialized"错误消息

shell - heredoc、重定向和文件描述符

linux - 在 Linux 中监控进程的启动

linux - 为什么 uniq -z 返回重复项?

git - 检测到 Cygwin/Git 错误 cygheap base mismatch

c++ - 如何从命令行编译和链接多个文件?