Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: egrep with zsh as /bin/sh - wordsplitting
- X-seq: zsh-users 8371
- From: Danek Duvall <duvall@xxxxxxxxxxxxxx>
- To: Zsh users list <zsh-users@xxxxxxxxxx>
- Subject: Re: egrep with zsh as /bin/sh - wordsplitting
- Date: Thu, 13 Jan 2005 13:23:51 -0800
- In-reply-to: <2005-01-13T17-30-35@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Danek Duvall <duvall@xxxxxxxxxxxxxx>, Zsh users list <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2005-01-13T17-30-35@xxxxxxxxxxxxxxxxxxxxxxxxx>
On Thu, Jan 13, 2005 at 09:50:18PM +0100, Michael Prokop wrote:
> Why does the original egrep version use ${1+"$@"} and not
> "$@" or "${1+"$@"}"?
My understanding is that if you write "$@", then with no arguments, in some
shells it becomes "" (i.e., an argument, but with no length), and that's
not actually what you want. ${1+"$@"} only adds something if there are any
arguments.
I don't know if this is a problem on any modern shell, though.
Danek
Messages sorted by:
Reverse Date,
Date,
Thread,
Author