From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16969 invoked from network); 14 Jan 2005 17:16:34 -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 17:16:34 -0000 Received: (qmail 78150 invoked from network); 14 Jan 2005 17:16:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Jan 2005 17:16:28 -0000 Received: (qmail 23462 invoked by alias); 14 Jan 2005 17:15:36 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8376 Received: (qmail 23443 invoked from network); 14 Jan 2005 17:15:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 14 Jan 2005 17:15:34 -0000 Received: (qmail 76857 invoked from network); 14 Jan 2005 17:15:34 -0000 Received: from unknown (HELO vrs.michael-prokop.at) (81.223.126.153) by a.mx.sunsite.dk with SMTP; 14 Jan 2005 17:15:29 -0000 Received: from localhost (unknown [81.223.126.153]) by vrs.michael-prokop.at (Postfix) with ESMTP id D38FD10410 for ; Fri, 14 Jan 2005 18:15:24 +0100 (CET) Date: Fri, 14 Jan 2005 18:15:16 +0100 From: Michael Prokop To: Zsh users list Subject: Re: egrep with zsh as /bin/sh - wordsplitting Message-ID: <2005-01-14T17-56-44@devnull.michael-prokop.at> Reply-To: Michael Prokop Mail-Followup-To: Zsh users list References: <2005-01-13T17-30-35@devnull.michael-prokop.at> <20050114084323.GA4606@sc> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050114084323.GA4606@sc> X-URL: http://www.michael-prokop.at/ X-Operating-System: Debian GNU/Linux - 2.6.8.1 on a i686 X-Registered-Linux-User: 224337 X-Crypto: GnuPG/1.2.3 http://www.gnupg.org X-GPG-Key-ID: 0x37E272E8 X-GPG-Key: http://www.michael-prokop.at/gpg X-GPG-Fingerprint: 04AE E62C 9502 CD34 A7DA 857B D8DF 53FB 37E2 72E8 User-Agent: Mutt/1.5.6+20041219i 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 * Stephane Chazelas [20050114 09:55]: > 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+"$@"}="$@"' Should I just add this line to /etc/zsh/zshenv? Because I'd like to fix this issue not just for egrep/fgrep but in general. ;-) BTW: Are there any other issues on using zsh as /bin/sh I should know of? > See info -f autoconf -n 'Shell Substitutions' Thanks for the pointer! > That should be > #!/bin/sh - > BTW. Could you please provide me more information regarding this? thx && regards, -mika- -- ,'"`. http://www.michael-prokop.at/ ( grml.org -» Linux for texttool-users and sysadmins `._, http://www.grml.org/