下面的脚本运行良好。
for i in `cat /app/scripts/symantec_scripts/list`
do ssh root@$i "uname -n
if [ -s /app/Symantec/virusdefs/definfo.dat ]; then
cat /app/Symantec/virusdefs/definfo.dat
else
cat /opt/Symantec/virusdefs/definfo.dat
fi
echo `service rtvscand status`
echo ....................................................................." ; done | tee /tmp/symantec_info.`date +"%m%d%y"`我们有一些具有/usr/symantec/virusdefs/definfo.dat文件位置的新服务器。
如何将上面的行添加到脚本中?我很感谢你的帮助。
发布于 2016-06-27 22:22:32
: ...
elif [ -s 'the other file' ]; then
: ...
fi其语法记录在bash(1)中。
https://unix.stackexchange.com/questions/292468
复制相似问题