From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14832 invoked from network); 14 Jan 2005 08:43:40 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 14 Jan 2005 08:43:40 -0000 Received: (qmail 89110 invoked from network); 14 Jan 2005 08:43:24 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Jan 2005 08:43:24 -0000 Received: (qmail 20220 invoked by alias); 14 Jan 2005 08:42:32 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8372 Received: (qmail 20206 invoked from network); 14 Jan 2005 08:42:30 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 14 Jan 2005 08:42:30 -0000 Received: (qmail 87763 invoked from network); 14 Jan 2005 08:42:06 -0000 Received: from smtp-out6.blueyonder.co.uk (195.188.213.9) by a.mx.sunsite.dk with SMTP; 14 Jan 2005 08:42:02 -0000 Received: from sc ([82.41.210.43]) by smtp-out6.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Fri, 14 Jan 2005 08:42:34 +0000 Date: Fri, 14 Jan 2005 08:43:23 +0000 From: Stephane Chazelas To: Zsh users list Subject: Re: egrep with zsh as /bin/sh - wordsplitting Message-ID: <20050114084323.GA4606@sc> Mail-Followup-To: Zsh users list References: <2005-01-13T17-30-35@devnull.michael-prokop.at> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2005-01-13T17-30-35@devnull.michael-prokop.at> User-Agent: Mutt/1.5.6i X-OriginalArrivalTime: 14 Jan 2005 08:42:34.0897 (UTC) FILETIME=[FE7AD810:01C4FA14] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Thu, Jan 13, 2005 at 09:50:18PM +0100, Michael Prokop wrote: > > I'm maintainer of a Linux Live-CD with zsh as it's default shell. > /bin/sh is pointing to /bin/zsh. > > I've a problem with the scripts egrep and fgrep. > That's the original egrep-script: > > ,---- [ /bin/egrep - original version ] > | #!/bin/sh > | exec grep -E ${1+"$@"} > `---- [...] That's a known issue, and the generally provided work-around is: test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}="$@"' See info -f autoconf -n 'Shell Substitutions' That should be #!/bin/sh - BTW. -- Stéphane