[Gllug] Simple Bash Script

Anthony Newman anthony.newman at ossified.net
Mon Jun 2 10:15:58 UTC 2008


william pink wrote:
> Well I have made the suggested adjustments but it still doesn't appear 
> to work

> if [ "$RESULT -eq $TRUE" ]; then
>     echo "test failed!"   
>     else echo "No problem to report"
> fi

Here's your problem; you're testing the truth of a quoted string, rather 
than evaluating their equality. Remove the quotes, or quote both strings 
separately, but not the whole expression.

if [ $RESULT -eq $TRUE ]; then
  ...



Ant
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list