Return status of 'rsh'
Conor P. Cahill
cpcahil at virtech.uucp
Thu Apr 11 00:26:13 AEST 1991
pbrown at 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
More information about the Comp.unix.questions
mailing list