home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / question / 13031 < prev    next >
Encoding:
Text File  |  1992-11-07  |  1.6 KB  |  49 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sun4nl!utrcu1!infnews!ahoekstr
  3. From: ahoekstr@cs.utwente.nl (Andre D. Hoekstra)
  4. Subject: Re: C-Shell question
  5. Message-ID: <1992Nov6.115704.23205@cs.utwente.nl>
  6. Followup-To: comp.unix.shell
  7. Sender: usenet@cs.utwente.nl
  8. Nntp-Posting-Host: rijn
  9. Organization: Universiteit Twente, afd. WB/WA (NOT cs)
  10. References: <1992Nov3.130759.27280@eua.ericsson.se> <1992Nov4.080338.9458@eua.ericsson.se> <1992Nov5.020850.572@news.csd.sgi.com>
  11. Date: Fri, 6 Nov 1992 11:57:04 GMT
  12. Lines: 35
  13.  
  14. In article <1992Nov5.020850.572@news.csd.sgi.com> vidya@akshay.csd.sgi.com (Vidya Alankar) writes:
  15. >The exit status you get is from the command "rsh" and not from the script it
  16. >executes. Since "rsh" completes normally, you will see "0" which is its 
  17. >"completion ok" status. If you do an "echo $status" inside the script, you
  18. >might see the exit status of the command of rm.
  19. >
  20. >- Vidya
  21.  
  22. NB: followup redirected to comp.unix.shell
  23.  
  24. The original question was:
  25.  
  26. I have a script that goes:
  27.  
  28. #!/bin/csh # ??
  29.  
  30. /bin/rm -f file
  31.  
  32. if ( $status ) then blabla
  33.  
  34. #end of script; exit
  35.  
  36. When I run this script normallly it works OK, but when I try to
  37. rsh somehost script
  38. I always get a $status of 0
  39.  
  40. As you can see the $status is referenced _inside_ the script, so Mr. vidy,
  41. I think you are wrong. Therefore there should a difference in the execution
  42. of the rm on thishost and somehost. Maybe the script is not even present on
  43. somehost?
  44.  
  45. Andre--
  46. -- 
  47. There is no reason for any individual to have a computer in    | Andre Hoekstra
  48. their home. (Ken Olson, Ex-President Digital Equipment, 1977)  | Enschede -- NL
  49.