[SunHELP] script help test on return value $?

Simon Jespersen shj at pine.dk
Wed Jul 10 08:28:41 CDT 2002


I need a little script help
I want to test on the return value from another program
#!/bin/ksh
#Running getstate.pl
getstate.pl

echo $? #the output is 1 but how do i test on this. I have programmet the
perl scritp so i returns 0 if outcome is diffrent than inspected and it
works.


if [ $? -eq 1 ] ; then    /this doesnt seem to work
    echo do something
fi


Simon Jespersen
Project engineer
Pine Tree Systems A/S
Damhaven 5d
DK-7100 Vejle
Email: shj at pine.dk
Phone: +4575724477



More information about the SunHELP mailing list