Subject: Re: Hacking rsh to add exit codes.
To: Todd Whitesel <toddpw@best.com>
From: Brian Stark <bstark@siemens-psc.com>
List: tech-userlevel
Date: 01/13/2000 10:28:08
On Thu, 13 Jan 2000, Brian Stark wrote:

>   if [ `rsh porter "date | wc -l"` != 0 ]; then
>     echo "oh no!"
>   else
>     echo "command was successful"
>   fi

oops... I noticed the example's logic for checking the return value is
reversed... oh well, you get the idea... This woul be more correct:

   if [ `rsh porter "date | wc -l"` != 0 ]; then
     echo "command was successful"
   else
     echo "oh no!"
   fi


Brian

-------------------------------------------------------------------------
| Brian Stark                       | Internet : bstark@siemens-psc.com |
| Siemens PT&D, Inc.                | Voice    : +1 612 536-4697        |
| Power Systems Control Division    | Fax      : +1 612 536-4919        |
| 7225 Northland Drive, Brooklyn Park, Minnesota 55428   USA            | 
-------------------------------------------------------------------------