4
运行shell脚本时“找不到命令”。我弄坏了什么?
我在OSX Snow Leopard上。 这是以下内容的全部内容grr.sh: #!/bin/sh echo wow 当我尝试从终端运行它时: $ grr.sh -bash: grr.sh: command not found $ /bin/sh grr.sh wow $ sh grr.sh wow $ bash grr.sh wow 好的。很公平。我将授予它可执行权限,然后重试: $ chmod +x grr.sh $ grr.sh -bash: grr.sh: command not found $ chmod 755 grr.sh $ grr.sh -bash: grr.sh: command not found …