1. 程式人生 > >Linux錯誤:warning: here-document at line 5 delimited by end-of-file (wanted `EOF`

Linux錯誤:warning: here-document at line 5 delimited by end-of-file (wanted `EOF`

 shell 指令碼執行‘warning’:

執行此test.shell報如下錯:

warning: here-document at line 17 delimited by end-of-file (wanted `EOF')

原因是末尾的EOF後面帶有空格,EOF前後都不應有空格或其他符號。

去掉EOF兩邊的空格和符號後,執行通過。