|
-gt expects numeric inputs. "50%" is not a numeric input, but "50" is. You need to strip the % sign out of your input before testing against it.
So, instead of:
y=50%
You would use:
y=50
and to strip the % out in the x line, add a pipe to your favorite regex engine. My example uses sed:
x=`df -kl | grep $fs | awk '{ print $5 }' | sed 's/%//'`
For perl, it's identical except for the command:
x=`df -kl | grep $fs | awk '{ print $5 }' | perl -pe 's/%//'`
|