macos - 从 Mac Automator 运行 Shell 脚本

标签 macos bash automator

在 OS X 10.9.5 中

我写了一个 Shell 脚本(通过 vim)。保存它并导航到这个脚本和

sh code.sh它运行完美(在 iTerm 和 Total Terminal 中)。

同一目录中的同一命令通过 Mac Automator 始终生成错误。为什么?

在 Automator 和终端中。

回显 $SHELL /斌/庆典 为什么无法通过 Automator 运行 shellscript。 enter image description here

最佳答案

可以通过在当前代码之上添加以下代码来解决此问题:

export PATH=/usr/local/bin:$PATH

关于macos - 从 Mac Automator 运行 Shell 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25161100/

相关文章:

macos - 输入法 (IMKit) 设置问题

linux - 当我在 sed 中设置 100.000 距离时,使用命令 sed 和 "Argument list too long"第一次压缩时出现 Tar 错误

git - 加速 bash 脚本将 git repo 转换为 LFS

bash - bash中的TCP/Socket服务器

bash - 如何解析rsync统计数据?

macos - 如何使用 SpriteKit 和 Swift 检测在 OSX 开发中的 SKSpriteNode 上输入的鼠标?

java - 为什么 Jar Bundler 在 Mac OS X Mountain Lion 10.8.2 中消失了

macos - Docker for Mac 的 Docker 守护程序日志

macos - 使用 AppleScript 从文本文档中提取两个字符串之间的字符串

macos - 将 Automator 操作拖放到 AMWorkflowView