[英]How to execute sh shell script on different shellscsh/tcsh shell?
如何在不同的shell(例如csh / tcsh shell)上執行sh shell腳本? sh和csh或tcsh會有不同的語法。 例如:某些shell的變量賦值是不同的,例如sh shell中的var = value和tcsh中設置var = value的情況類似,在sh和endw中的end stmt esac在tcsh shell中也是如此。
您的系統應該有一個/ bin / sh,因此您可以像這樣運行您的shell腳本: /bin/sh YourScript.sh
注意,您必須確保您的腳本沒有使用任何csh / tcsh / bash / zsh特定功能。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.