I am debugging a bash shell script, and I am getting this error message:
[[: not found
The line number it points to is the end of my outer do loop.
Any ideas?
Thanks!
Edit: here is the script: https://github.com/stephenh/git-central/blob/master/server/post-receive-hudson
The
[[is used in BASH as a builtin test condition. However, it doesn’t work in regular Bourne shell that many systems default to when running things like cronjobs, etc.Are you putting the shebang (
#! /bin/bash) as the first line of your shell scripts? Is this a cronjob? Can you print out the value of$RANDOM(Bash will print out a value, Bourne will not)?Show us the program that’s giving you this problem, and tell us about the system it’s running on (Linux? Solaris? Intel? Cygwin?) maybe we can figure it out.