Sample Header Ad - 728x90

What is the difference between the Bash operators [[ vs [ vs ( vs ((?

592 votes
7 answers
314329 views
I am a little bit confused on what do these operators do differently when used in bash (brackets, double brackets, parenthesis and double parenthesis). [[ , [ , ( , (( I have seen people use them on if statements like this: if [[ condition ]] if [ condition ] if ((condition)) if (condition)
Asked by RetroCode (6069 rep)
Aug 27, 2016, 06:43 PM
Last activity: Jan 27, 2025, 07:40 PM