Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!hadron!inco!mack From: mack@inco.UUCP (Dave Mack) Newsgroups: comp.unix.questions Subject: Re: \"+\" filename -> /bin/sh ! Message-ID: <465@inco.UUCP> Date: Wed, 21-Oct-87 17:24:55 EDT Article-I.D.: inco.465 Posted: Wed Oct 21 17:24:55 1987 Date-Received: Sat, 24-Oct-87 07:34:48 EDT References: <3351@sol.ARPA> <18062@teknowledge-vaxc.ARPA> Organization: McDonnell Douglas-INCO, McLean, VA Lines: 37 Summary: The Answer (???) In article <18062@teknowledge-vaxc.ARPA>, mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) writes: > On Sun OS 3.4: > > csh% /bin/sh + > +: Command not found > > sh$ /bin/sh + > sh$ > When csh is given the text file, it checks the first character of the file to see if it's '#'. If not, it hands the file off to /bin/sh. /bin/sh interprets a '+' or '-' on the command line as an attempt to set or reset a flag. It apparently ignores an absent or unrecognized flag silently. Having used up its argv, it thinks it was invoked without arguments, so it lights up interactively. If the file named "+" contains: # comment date [EOF] the + command works as expected. -- Dave Mack The Lord of the Files McDonnell Douglas-Inco, Inc. DISCLAIMER: The opinions expressed 8201 Greensboro Drive are my own and in no way reflect the McLean, VA 22102 views of McDonnell Douglas or its (703)883-3911 subsidiaries. {uunet | sundc | rlgvax | netxcom | decuac}!hadron!inco!mack 8============================================================================)