When I test a script bellow:
#!/bin/bash
num1=100
num2=100
if test $num1 -eq $num2 # there is no difference using $num1 ,$[num1] and ${num1}
then
echo "equal"
else
echo "not equal"
fi
I know if we echo the variable, we should use the {}
to define the periphery, but how about the []
? Does []
some difference with {}
?