Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!decuac!avolio From: avolio@decuac.DEC.COM (Frederick M. Avolio) Newsgroups: net.unix-wizards,net.unix Subject: Re: Repeat of a question posted to net.unix (resp: shell processing) Message-ID: <1066@decuac.DEC.COM> Date: Sat, 20-Sep-86 08:16:37 EDT Article-I.D.: decuac.1066 Posted: Sat Sep 20 08:16:37 1986 Date-Received: Sat, 20-Sep-86 20:42:43 EDT References: <2729@rsch.WISC.EDU> <5867@topaz.RUTGERS.EDU> Distribution: na Organization: ULTRIX Applications Center, MD Lines: 25 Summary: rm acts as -f with non-tty Xref: mnetor net.unix-wizards:7926 net.unix:5555 > > 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! I answered the original poster by mail a week or two ago (whenever it was posted). After that the poster reposted to net.unix-wizards saying there was no response from net.unix. Suggestion -- wait a week or more for your article or propagate through the net and another week to get something back before you repost. Rm checks to see if there is a controlling tty. In the case of a shell execing a background process, the child does not inherit the controlling terminal. Rm checks to see and if no controlling terminal it acts as if you said "-f". This is why no error message in this case. -- Fred @ DEC Ultrix Applications Center INET: avolio@decuac.dec.com * Fight the Fight * UUCP: {decvax,seismo,cbosgd}!decuac!avolio * Rescue the Unborn *