写shell脚本时,直接复制网上的代码后,每行末尾一般有空格或者tab,需要删除每行末尾的空字符。 cmd <<EOF cmd2 cmd3 EOF(有空格或tab都不行) Was this helpful? YesNo 0 / 0