comparison operators in sh script
Posted on 2004-10-07
I have a shell script, written in Bourne shell:
and I want to check if a variable is equal or not equal to something. For example, I tried using:
if [[ $STATUS = "BUILT" ]] only seems to work with Korn shell
if [[ $STATUS -eq "BUILT" ]] only seems to work with Bash shell
So what are the comparison operators for Bourne shell, preferably is equal to or not equal to?