Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While running a bash script, I get this error:

 sh: [[: not found

How can I find what where is the problem?

share|improve this question
up vote 6 down vote accepted

[[ is a bash command that is not compatible with sh. Run the script with bash instead:

$ bash ./

Or edit the shebang:

#!/usr/bin/env bash


$ ./
share|improve this answer
Or put #!/usr/bin/env bash at the top of your script. – Dean Nov 4 '13 at 21:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.