I am getting a syntax error when I try to test the following and it appears to be due to the 0 which is there. What am I missing here?
This is the code:
echo =========================================
echo sum of 4 arguments:"$requestedsum"
if [ -n "$requestedsum" ]
then
(( $(echo "$requestedsum > $vg_free_space" |bc)));
echo "Requested space is not available in VG";
else
echo "Requested space is available";
fi
=========================================
sum of 4 arguments:0
10
./sizecheck.sh: line 26: ((: 0
1: syntax error in expression (error token is "1")
Requested space is not available in VG