Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!mimsy!umd5!decuac!avolio From: avolio@decuac.dec.com (Frederick M. Avolio) Newsgroups: comp.unix.questions Subject: \"+\" filename -> /bin/sh ! Message-ID: <1761@decuac.DEC.COM> Date: Tue, 20-Oct-87 12:59:03 EDT Article-I.D.: decuac.1761 Posted: Tue Oct 20 12:59:03 1987 Date-Received: Thu, 22-Oct-87 00:26:11 EDT References: <3351@sol.ARPA> <18062@teknowledge-vaxc.ARPA> Sender: Unknown@decuac.DEC.COM Organization: DEC SWS, Landover, MD Lines: 39 In article <18062@teknowledge-vaxc.ARPA> mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) writes: >in article <3351@sol.ARPA>, ken@cs.rochester.edu (Ken Yap) says: >> Since + is a non-binary, you are effectively doing /bin/sh +. Try >> this: >> /bin/sh + >> >> and get an interactive sh. In fact any argument starting with + >> will get you the same result. >On Ultrix 1.2, from either /bin/csh or /bin/sh I get: > > +: +: cannot open > I am not sure what all the hubbub (haven't used THAT one in awhile, eh?) is all about but it all depends on how arguments to the particular shell are handled and what version of the shell, etc. For example, the System V r 2 Bourne Shell that comes with ULTRIX-32 (/bin/sh5) does indeed start up a subshell on your terminal as originally discribed. The reason is that a '+' is allowed, similar to a '-' to turn on some flags (see the manual page). It goes into a piece of code which affectively says: "sh +" Hmmmm... let's parse those arguments... I see a '+'. Let's go into a while loop, turning on options as we go while options -- oops, no more options, bailout Now, for more arguements... Oh, no more. Drop through. Ok, I am ready... no file name so read from the tty Now, admittedly, I am not sure that this is a Good Thing, but this is *why* it happens and does not happen on all shells. Depends on *which* Bourne shell it is (v7? SysVr2.0? 2.2? SysVr3?) and how it is written. Fred