I am messing with shell scripting and stuck in some comparison in while loop
while [$size -le $MAX]
do
------
done
The above loop is not working. What am I doing wrong ?
You don't have spaces around [ and ].
Say:
while [ $size -le $MAX ]
[ is a command, also known as test. When you say [$size, the shell interprets it as a string and not as a command.