From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16007 invoked from network); 7 Oct 2006 17:22:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Oct 2006 17:22:12 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 96323 invoked from network); 7 Oct 2006 17:22:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Oct 2006 17:22:05 -0000 Received: (qmail 2262 invoked by alias); 7 Oct 2006 17:21:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10810 Received: (qmail 2253 invoked from network); 7 Oct 2006 17:21:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 7 Oct 2006 17:21:56 -0000 Received: (qmail 95180 invoked from network); 7 Oct 2006 17:21:56 -0000 Received: from dan.emsphone.com (199.67.51.101) by a.mx.sunsite.dk with SMTP; 7 Oct 2006 17:21:55 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id k97HLcmC021464; Sat, 7 Oct 2006 12:21:38 -0500 (CDT) (envelope-from dan) Date: Sat, 7 Oct 2006 12:21:38 -0500 From: Dan Nelson To: Bart Schaefer Cc: Zsh users list Subject: Re: Move command line options to start of line Message-ID: <20061007172138.GD65461@dan.emsphone.com> References: <200610071202.k97C2BbC003441@pwslaptop.csr.com> <061007053926.ZM30314@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <061007053926.ZM30314@torch.brasslantern.com> X-OS: FreeBSD 6.2-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.13 (2006-08-11) In the last episode (Oct 07), Bart Schaefer said: > On Oct 7, 1:02pm, Peter Stephenson wrote: > } Consider (example contrived on the spur of the moment, but not > } wholly unrealistic): > } > } su -c 'rm -f .zshrc' username -l > > But does > > su -c'rm -f .zshrc' username > > work in a true POSIX shell? Is it required to? su isn't POSIX, but I don't think either of the above commands should work. -c isn't an option to su, it's an option to the shell launched by su, so it should follow the username. Linux's su apparently passes -c on to the shell, but no other OSes do (and some use -c themselves). -- Dan Nelson dnelson@allantgroup.com