Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: Return status of 'rsh' Message-ID: <1991Apr10.142613.12656@virtech.uucp> Date: 10 Apr 91 14:26:13 GMT References: Distribution: comp Organization: Virtual Technologies Inc. Lines: 23 pbrown@vtopus.cs.vt.edu (Patrick R. Brown) writes: >I am trying to set up a shell script to check for mail on a remote >machine. The script is the following: > # > if [ `rsh csgrad mail -e` ] >This looks nice, but it doesn't work. (I never "have" mail, even when rsh does not return the status of the command that it executed on the other machine. There is nothing you can do to change that, however you have two other options. 1. Use the following: rsh csgrad "if mail -e; then echo you have mail; else \ echo no mail; fi" 2. have csgrad forward the mail to your current machine so that yout don't have to worry about checking the mail somewhere else -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc. uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170