Why does this simple if statement result in a syntax error?
#!/bin/bash
if [[ 1 == 1 ]] ; then
# echo "hello"
fi
The error is
line 5: syntax error near unexpected token `fi'
It works as expected if the echo is uncommented.
Edit
Thanks, fixed the error using :. Silly bash. =P
#!/bin/bash
if [[ 1 == 1 ]] ; then
:# echo "hello"
fi