tags:

views:

42

answers:

2
+4  A: 

The first line of your script needs to be:

#!/bin/bash

Without that shebang line, your script will be interpreted by sh which doesn't understand [[ in if statements.

Dennis Williamson
Thanks Dennis. The dufus who originally wrote this code used #!/bin/sh on all the scripts. I missed changing this one.
Justin
A: 

If you are checking for equality, shouldn't the if be ?

if [[ "${debugMode}" = "true" ]]; then .... fi

Gangadhar
In Bash, in this context, `==` and `=` are interchangeable.
Dennis Williamson