export JAVA_HOME=/usr/java/jdk1.5.0_22
export PATH=$JAVA_HOME/bin:$PATH
CHECK=`/opt/OV/TNT/adapter/bin/temip_adapter_show | grep "The Adapter is initialized and ready" | wc -l`
if [$CHECK -ne 0]
then
echo "Atni adapter is already running, Please check"
else
/opt/OV/TNT/adapter/bin/temip_adapter -start
fi
mailx -s "NNMi Atni Adapter status" -r srijan.chaudhary@hpe.com <<-EOF
Hi Team,
NNMi Atni适配器已成功启动
的问候,
NNM服务器
EOF
答案 0 :(得分:0)
在[和之前]之后添加空格,如下所示;你可以试试这个;
export JAVA_HOME=/usr/java/jdk1.5.0_22
export PATH=$JAVA_HOME/bin:$PATH
CHECK=`/opt/OV/TNT/adapter/bin/temip_adapter_show | grep "The Adapter is initialized and ready" | wc -l`
if [ $CHECK -ne 0 ]
then
echo "Atni adapter is already running, Please check"
else
/opt/OV/TNT/adapter/bin/temip_adapter -start
fi
echo "NNMi Atni Adapter status" | mailx -s "NNMi Atni Adapter status" srijan.chaudhary@hpe.com
答案 1 :(得分:0)
编辑最后一行: mailx -s“TeMIP服务器已成功启动”srijan.chaudhary@hpe.com - -f srijan.chaudhary@hpe.com<&lt; -EOF
并清除脚本中的所有特殊字符。