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


Groups > gnu.bash.bug > #15483

Re: Is this a bug by any chance?

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: Is this a bug by any chance?
Date 2019-10-07 10:26 -0400
Message-ID <mailman.1228.1570458422.2651.bug-bash@gnu.org> (permalink)
References (2 earlier) <20191007124737.GM28751@eeg.ccf.org> <7892e473-d0d2-1207-8eb1-916b8571a496@passchier.net> <20191007133716.GR28751@eeg.ccf.org> <87v9t01vnz.fsf@igel.home> <20191007142658.GU28751@eeg.ccf.org>

Show all headers | View raw


On Mon, Oct 07, 2019 at 04:23:44PM +0200, Andreas Schwab wrote:
> On Okt 07 2019, Greg Wooledge <wooledg@eeg.ccf.org> wrote:
> 
> > x=(1 2 3 4 5 -n '/*' 'hello world')
> > for z in "${x[@]}"; do
> >   printf %s "$z"
> > done
> > echo
> 
> (IFS=; printf '%s\n' "${x[*]}")

Or avoid the fork():

printf %s "${x[@]}"
echo

I preserved the original poster's loop, because it's probably
another !b9 question.

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Is this a bug by any chance? Greg Wooledge <wooledg@eeg.ccf.org> - 2019-10-07 10:26 -0400

csiph-web