I am trying to test if Variable X is less than 50, if yes then print it (echo it), but I am getting no output!
X=1
if [$X -lt 50]
then
echo $X
fi
CodePudding user response:
Try with the following :
X=1
if [ "$X" -lt 50 ]
then
echo $X
fi
Whitespace matters in bash.