2011-03-17 157 views
8

的name.sh已經用C保存:\的Documents and Settings \用戶,I型SH name.sh如何在cygwin中執行shell腳本?

SH:testing.sh:沒有這樣的文件或目錄

任何幫助將不勝感激!

+1

請不要[cross-post](http://superuser.com/questions/258587/how-to-execute-shell-script-in-cygwin)。 – 2011-03-17 05:46:41

回答

10

您只需鍵入./name.sh並且您的腳本應該運行。

如果您的當前目錄不在您的$PATH中,那麼添加./會告訴shell看起來那裏。

另一種可能性是您目前不在正確的目錄中。如果pwd結果顯示你是不是在C:\Documents and Settings\user,那麼你就需要cd到該目錄,或將腳本你在任何目錄。