for SERVER in `grep -i "ma" /home/fsgapp/Test/test_dat`
do
printf "$SERVER\n"
ssh fsgapp@$SERVER bash -T <<-'HERE'
pwd
cd /usr/jboss/
pwd
'HERE'
done
当我尝试执行此脚本时,我得到了 第10行:语法错误:意外的文件结尾
答案 0 :(得分:0)
尝试删除此处的'
。
从手册中:
If any characters in word are quoted, the delimiter is the result of quote removal on word, and the lines in the here-document are not expanded.
至少最后的分隔符必须没有引号。