Gday,
I m 在使用像以下的手稿时,会错失:
ssh root@mm-$user-vm-lenny <<EOF
check_dbtag=`grep "<<include /home/$user/cvs/dbtag.conf>>" /etc/dbtag.conf`
if [ "$check_dbtag" == "" ]
then
echo <<include /home/$user/cvs/dbtag.conf>> >> /etc/dbtag.conf
fi
EOF
I m 正在出现错误
-bash: line 21: syntax error near unexpected token newline
-bash: line 21: check_dbtag=<<include /home/thomasw/cvs/dbtag.conf>>
然而,如果我改变这条线,我不会再 any。
check_dbtag=`grep "<<include /home/$user/cvs/dbtag.conf>>" /etc/dbtag.conf`
纽约总部
check_dbtag=`grep <<include /home/$user/cvs/dbtag.conf>> /etc/dbtag.conf`
但$user
don t interpolate anymore.
我如何能够在没有任何错误的情况下正确推断变数?