On Fri, 2006-09-29 at 19:08 +0100, Tom Brown wrote: > > Pipe the output through: > > > > sed -e 's/^UCD-SNMP-MIB::[^:]*: //' > > thanks - seems to be OK now can i ask another question > > I have this at the end of a script to interpret the output code correctly > > if [ $EXITCODE -eq 0 ]; then > echo "$OUTPUT" | grep -v CRITICAL > [ $? -eq 1 ] && EXITCODE=2 > fi > > but when the script runs i get this > > ../libexec/retrieve_custom_snmp: line 84: [: -eq: unary operator expected > "CRITICAL emcpowera has 2 dead, 2 alive" > > can anyone help with this issue What is $EXITCODE set to? How is it set? Paul.