[ and [[ behave differently with -eq , although the info page give no hints about this: 6.4 Bash Conditional Expressions ================================ Conditional expressions are used by the '[[' compound command and the 'test' and '[' builtin commands. ... 'ARG1 OP ARG2' 'OP' is one of '-eq', '-ne', '-lt', '-le', '-gt', or '-ge'. These arithmetic binary operators return true if ARG1 is equal to, not equal to, less than, less than or equal to, greater than, or greater than or equal to ARG2, respectively. ARG1 and ARG2 may be positive or negative integers. Examples of the difference: [imz@ovicaa ~]$ [ a -eq b ] && echo yes bash: [: a: integer expression expected [imz@ovicaa ~]$ [[ a -eq b ]] && echo yes yes [imz@ovicaa ~]$ rpm -q bash bash-3.2.57-alt1 -bash-4.3# [ a -eq b ] && echo yes -bash: [: a: integer expression expected -bash-4.3# [[ a -eq b ]] && echo yes yes -bash-4.3# rpm -q bash bash-4.3.42-alt2.x86_64