Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14432 > unrolled thread

Re: Unquoted array slice ${a[@]:0} expands to just one word if IFS doesn't have a space

Started byGreg Wooledge <wooledg@eeg.ccf.org>
First post2018-08-01 09:40 -0400
Last post2018-08-01 09:40 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Unquoted array slice ${a[@]:0} expands to just one word if IFS doesn't have a space Greg Wooledge <wooledg@eeg.ccf.org> - 2018-08-01 09:40 -0400

#14432 — Re: Unquoted array slice ${a[@]:0} expands to just one word if IFS doesn't have a space

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2018-08-01 09:40 -0400
SubjectRe: Unquoted array slice ${a[@]:0} expands to just one word if IFS doesn't have a space
Message-ID<mailman.4554.1533130822.1292.bug-bash@gnu.org>
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.

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web