Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!pyramid!uccba!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon Allbery) Newsgroups: comp.unix.questions Subject: Re: Trick question Message-ID: <4924@ncoast.UUCP> Date: Thu, 22-Oct-87 17:56:25 EST Article-I.D.: ncoast.4924 Posted: Thu Oct 22 17:56:25 1987 Date-Received: Sun, 25-Oct-87 14:30:21 EST References: <666@portofix.liu.se> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.unix.questions Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 22 As quoted from <666@portofix.liu.se> by kjepo@portofix.liu.se (Kjell Post): +--------------- | A little trick question for you all: what's happening here? | | % cat > + | date | ^D | % chmod +x + | % + | $ -- entered Bourne-shell +--------------- Is this on System V with a csh, or a Sun or other BSD system with the System V sh? The System V sh treats + like - for setting flags; as a result, when execvp() does its thing you get sh + which will start an interactive shell. -- Brandon S. Allbery necntc!ncoast!allbery@harvard.harvard.edu {{harvard,mit-eddie}!necntc,well!hoptoad,sun!mandrill!hal}!ncoast!allbery