I have a script, and I am getting an error as syntax error in expression on line 4. I am guessing it is because of trailing spaces after 0" and befoe ]. If I remove that I am getting different error. How else I can modify this line to make it work?
Surprisingly I do not see any error on line1 . This is snippet of bigger script, so log is a variable defined already.
1 if [ "$Total" -ge 1024 ]
2 then
3 echo "Good to go" >> "$log"
4 if [ "$((a-(b + c))) -ge 0" ] ; then echo "YES" | tee -a "$log"; else echo "NO" | tee -a "$log"; fi
5 else
6 echo "can't proceed" >> "$log"
7 echo "NO" | tee -a "$log"
8 exit 0
9 fi