The following code works as expected on CentOS and Ubuntu O/s but not on Red hat. What changes needs to be made?
CentOS release 5.3 (Final)
Linux ubuntu 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686 GNU/Linux
#!/bin/bash
depot=$1
table=$2
database=$3
combined="$depot$table"
if [ "$table" = 'routes' -o "$table" = 'other_routes' ]; then
echo 'first if successful'
elif [ "$table" = 'bus_stops' ]; then
echo 'elif successful'
else
echo 'else succsesful'
fi
I’ve got both Red Hat Enterprise Linux and CentOS boxes here (I know they’re the same thing)
That script works the same on both of them for me, so I really don’t understand the OP’s question.