help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Awkward behavior of empty arrays


From: Greg Wooledge
Subject: Re: [Help-bash] Awkward behavior of empty arrays
Date: Thu, 31 Aug 2017 12:57:31 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Thu, Aug 31, 2017 at 09:16:46AM -0700, Andy Chu wrote:
> There are only 3 possibilities from the four constructs (AFAICT $* is
> identical to $@):

At the risk of preaching to the choir, unquoted $* and $@ are dangerous.
They don't even have consistent semantics across different shells!
See <https://lists.gnu.org/archive/html/bug-bash/2017-06/msg00283.html>.

Only use quoted "$@" and "$*".  Ever.  Always.  Obviously the same
applies to the array versions, "address@hidden" and "${a[*]}".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]