Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!mit-eddie!genrad!decvax!tektronix!reed!kab From: kab@reed.UUCP (Kent Black) Newsgroups: comp.bugs.4bsd Subject: Re: Arguments to 4.3BSD "sh -c" commands are mishandled Message-ID: <4860@reed.UUCP> Date: Mon, 15-Dec-86 17:55:18 EST Article-I.D.: reed.4860 Posted: Mon Dec 15 17:55:18 1986 Date-Received: Wed, 17-Dec-86 02:33:35 EST References: <7296@elsie.UUCP> Reply-To: kab@reed.UUCP (Kent Black) Organization: Reed College, Portland, OR Lines: 18 In article <7296@elsie.UUCP> ado@elsie.UUCP (Arthur David Olson) writes: = Index: bin/sh 4.3BSD = = Description: = Arguments to a "sh -c" command are mishandled. = = Repeat-By: = Type in the command = sh -c 'echo $*' a b c d = and note the incorrect output: = b c d This is not a bug; $* expands to $1 - $n, i.e., skips $0, which happens to be 'a'. Try sh -c 'echo $0' a b c -- kab