home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sun4nl!utrcu1!infnews!ahoekstr
- From: ahoekstr@cs.utwente.nl (Andre D. Hoekstra)
- Subject: Re: C-Shell question
- Message-ID: <1992Nov6.115704.23205@cs.utwente.nl>
- Followup-To: comp.unix.shell
- Sender: usenet@cs.utwente.nl
- Nntp-Posting-Host: rijn
- Organization: Universiteit Twente, afd. WB/WA (NOT cs)
- References: <1992Nov3.130759.27280@eua.ericsson.se> <1992Nov4.080338.9458@eua.ericsson.se> <1992Nov5.020850.572@news.csd.sgi.com>
- Date: Fri, 6 Nov 1992 11:57:04 GMT
- Lines: 35
-
- In article <1992Nov5.020850.572@news.csd.sgi.com> vidya@akshay.csd.sgi.com (Vidya Alankar) writes:
- >The exit status you get is from the command "rsh" and not from the script it
- >executes. Since "rsh" completes normally, you will see "0" which is its
- >"completion ok" status. If you do an "echo $status" inside the script, you
- >might see the exit status of the command of rm.
- >
- >- Vidya
-
- NB: followup redirected to comp.unix.shell
-
- The original question was:
-
- I have a script that goes:
-
- #!/bin/csh # ??
-
- /bin/rm -f file
-
- if ( $status ) then blabla
-
- #end of script; exit
-
- When I run this script normallly it works OK, but when I try to
- rsh somehost script
- I always get a $status of 0
-
- As you can see the $status is referenced _inside_ the script, so Mr. vidy,
- I think you are wrong. Therefore there should a difference in the execution
- of the rm on thishost and somehost. Maybe the script is not even present on
- somehost?
-
- Andre--
- --
- There is no reason for any individual to have a computer in | Andre Hoekstra
- their home. (Ken Olson, Ex-President Digital Equipment, 1977) | Enschede -- NL
-