如何在 csh/tcsh shell 等不同的 shell 上执行 sh shell 脚本? sh 和 csh 或 tcsh 会有不同的语法。?例如:某些 shell 的变量赋值是不同的,例如 sh shell 中的 var=value 和 tcsh 中的 set var=value 类似地 case end stmt esac in sh 和 endsw in tcsh shell。
最佳答案
你的系统应该有/bin/sh,所以你可以像这样运行你的 shell 脚本:/bin/sh YourScript.sh
注意你必须确保你的脚本没有使用任何 csh/tcsh/bash/zsh 特定功能。
关于linux - 如何在不同的 shellscsh/tcsh shell 上执行 sh shell 脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40585077/