[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unquoted array slice ${a[@]:0} expands to just one word if IFS doesn
From: |
Greg Wooledge |
Subject: |
Re: Unquoted array slice ${a[@]:0} expands to just one word if IFS doesn't have a space |
Date: |
Wed, 1 Aug 2018 09:40:12 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Wed, Aug 01, 2018 at 04:06:03PM +0300, Ilkka Virta wrote:
> Unquoted $* seems well-defined in Bash's reference manual:
>
> ($*) Expands to the positional parameters, starting from one. When the
> expansion is not within double quotes, each positional parameter
> expands to a separate word.
But not in reality.
https://lists.gnu.org/archive/html/bug-bash/2017-06/msg00283.html
https://lists.gnu.org/archive/html/bug-bash/2017-09/msg00058.html
https://lists.gnu.org/archive/html/bug-bash/2018-01/msg00035.html
Unquoted $* or $@ is just a disaster. Don't do it.
Re: Unquoted array slice ${a[@]:0} expands to just one word if IFS doesn't have a space, Chet Ramey, 2018/08/02