Bash script if statements

Posted by Jonhnny Weslley on Stack Overflow See other posts from Stack Overflow or by Jonhnny Weslley
Published on 2010-04-14T21:00:50Z Indexed on 2010/04/14 21:03 UTC
Read the original article Hit count: 151

Filed under:
|

In Bash script, what is the difference between the following snippets?

1) Using single brackets:

if [ "$1" = VALUE ] ; then
 # code
fi

2) Using double brackets:

if [[ "$1" = VALUE ]] ; then
 # code
fi

© Stack Overflow or respective owner

Related posts about bash

Related posts about unix