I'm a newbie of bash. When I try to use the command [[
for compare, I encounter the problem as below:
[root@JD ~]# [[ 2 <= 2 ]]
-bash: syntax error in conditional expression
-bash: syntax error near `2'
From my tutorial book, [ 2 -le 2 ]
should be equal to [[ 2 <= 2 ]]
, I don't know the reason why it's a syntax error.