Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!vtserf!creatures!creatures.cs.vt.edu!pbrown From: pbrown@vtopus.cs.vt.edu (Patrick R. Brown) Newsgroups: comp.unix.questions Subject: Return status of 'rsh' Message-ID: Date: 9 Apr 91 18:49:35 GMT Sender: usenet@creatures.cs.vt.edu Distribution: comp Organization: Virginia Tech, Department of Computer Science Lines: 27 I am trying to set up a shell script to check for mail on a remote machine. The script is the following: #! /bin/sh # # Check mail on CSGrad since I can't get mail here!!!! # if [ `rsh csgrad mail -e` ] then echo You have mail on CSGrad. else echo You do not have mail on CSGrad. fi This looks nice, but it doesn't work. (I never "have" mail, even when I do) What can I do (if anything) to get 'rsh' to return the status of the command being run remotely. The Ultrix man pages don't have anything to say on this topic. If 'rsh' won't do this, are there any other ideas? Thanks in advance, Pat -- Patrick R. Brown __ _________ email: pbrown@csgrad.cs.vt.edu \ \ / ___ __/ Virginia Tech: smail: 375 New Kent Rd. \ \/ / / / "Po but Proud" Blacksburg, VA 24060 \__/ /_/ (703) 552-4016