Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!decwrl!pyramid!prls!philabs!micomvax!musocs!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP Newsgroups: net.unix-wizards Subject: Re: Repeat of a question posted to net.unix (resp: shell processing) Message-ID: <531@mcgill-vision.UUCP> Date: Sun, 28-Sep-86 22:03:54 EDT Article-I.D.: mcgill-v.531 Posted: Sun Sep 28 22:03:54 1986 Date-Received: Fri, 24-Oct-86 01:22:15 EDT References: <2729@rsch.WISC.EDU> <5867@topaz.RUTGERS.EDU> Distribution: na Organization: McGill University, Montreal Lines: 28 In article <5867@topaz.RUTGERS.EDU>, dpz@topaz.RUTGERS.EDU (David P. Zimmerman) writes: >> Assume that file "nxf" does not exist. >> Assume that the following lines are in shell script 'cmd': >> >> #!/bin/csh >> rm nxf >& cmd_out >> echo $status > cmd_stat > > Same problem here on a 4.2 system. But replace "rm nxf" with "ping > foo" or "test" and everything works OK. Bug in rm? No, a feature in rm. If rm's standard input is not a terminal, the -f flag is turned on, which makes rm ignore all error conditions (including "file does not exist"). I just now checked this in the 4.3 source code; presumably other systems which exhibit this behavior have similar tests. This is only sort of documented in the man page for rm; perhaps the documentation should be cleaned up? der Mouse USA: {ihnp4,decvax,akgua,utzoo,etc}!utcsri!mcgill-vision!mouse think!mosart!mcgill-vision!mouse Europe: mcvax!decvax!utcsri!mcgill-vision!mouse ARPAnet: think!mosart!mcgill-vision!mouse@harvard.harvard.edu Aren't you glad you don't shave with Occam's Razor?