Shell脚本运行报错:[: : integer expression expected
#!/bin/bash
test=$( df -h | grep sda5 | awk '{print $5}' |cut -d "%" -f 1)
if [ "$test" -ge '10' ]
then
echo "Warning:Rom too high"
fi
运行这个脚本的时候报[: : integer expression expected,
#!/bin/bash
test=$( df -h | grep sda5 | awk '{print $5}' |cut -d "%" -f 1)
if [ "$test" -ge '10' ]
then
echo "Warning:Rom too high"
fi
运行这个脚本的时候报[: : integer expression expected,
2017-06-10
举报