help-bash
[Top][All Lists]
Advanced

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

Re: looping over variables & exporting them at the same time ?


From: Greg Wooledge
Subject: Re: looping over variables & exporting them at the same time ?
Date: Mon, 29 Jan 2024 11:33:18 -0500

On Mon, Jan 29, 2024 at 04:42:54PM +0100, Paxsali via wrote:
> It's minus d single quote space single quote, not minus d single quote
> single quote.

That's what I used.  I was simply demonstrating that if the *input*
string contains multiple space characters in a row, the behavior is
different.  This could be good, bad, or irrelevant.

> Greg Wooledge <greg@wooledge.org> schrieb am Mo., 29. Jan. 2024, 16:37:
> > unicorn:~$ mapfile -t -d ' ' arr < <(printf %s 'a *   ! d')
> > unicorn:~$ declare -p arr
> > declare -a arr=([0]="a" [1]="*" [2]="" [3]="" [4]="!" [5]="d")

The option-argument of -d is a space.  The *input* string contains 3
spaces in a row.



reply via email to

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