当前位置: 技术问答>linux和unix
shell脚本挑错,请问都哪里错误了?谢谢。
来源: 互联网 发布时间:2016-04-11
本文导语: #!/bin/sh TXT=/folk/pekwbqa/bin/checkdisk/mailtxt LOG=/folk/pekwbqa/bin/checkdisk/log df /folk/pekwbqa/ -kh | sed -n 3p > /folk/pekwbqa/bin/checkdisk/diskspace PER=`awk '{print$4}' /folk/pekwbqa/bin/checkdisk/diskspace` PER=99% if ("$PER" -ge 0.98); then echo 1111111111111 else ec...
#!/bin/sh
TXT=/folk/pekwbqa/bin/checkdisk/mailtxt
LOG=/folk/pekwbqa/bin/checkdisk/log
df /folk/pekwbqa/ -kh | sed -n 3p > /folk/pekwbqa/bin/checkdisk/diskspace
PER=`awk '{print$4}' /folk/pekwbqa/bin/checkdisk/diskspace`
PER=99%
if ("$PER" -ge 0.98); then
echo 1111111111111
else
echo 2222222222222
fi
|
if ("$PER" -ge 0.98)
=====>
if [ "$PER" -ge 0.98 ]
=====>
if [ "$PER" -ge 0.98 ]