Thanks for the responses: > If you don't like either one then write your own command. Two is probably enough :))
> with their head and heels in the sand. Interesting - I don't want to know about it but if I must know about it then I just don't want it. :)) > You can check for return code 1 and parse only in that case > the output of stderr. There is alway a "#" in front if the > number, which might help you parsing. How does this look? # cat foo function cp_cmd { echo "Invoking CP command: $@" retVal=$(vmcp $@ 2>&1 | grep "Error: non-zero CP response" | awk -F# '{print $2}') return $retVal } cp_cmd q linux04 echo "retVal from cp_cmd = $?" cp_cmd q tcpip echo "retVal from cp_cmd = $?" # ./foo Invoking CP command: q linux04 retVal from cp_cmd = 45 Invoking CP command: q tcpip retVal from cp_cmd = 0 "Mike MacIsaac" <[EMAIL PROTECTED]> (845) 433-7061 ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390