bug-bash
[Top][All Lists]
Advanced

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

Re: Trailing newlines disappear


From: Peter & Kelly Passchier
Subject: Re: Trailing newlines disappear
Date: Fri, 9 Jun 2017 03:54:08 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 09/06/2560 03:44, Geir Hauge wrote:
> Greg already pointed out that this doesn't work.
> 
> You can pick one of these instead:
> 
>     mapfile < "$file"; IFS= foo="${MAPFILE[*]}"; unset -v IFS
> 
> or
> 
>     mapfile < "$file"; printf -v foo %s "address@hidden"
> 
Yes, thanks.
The second one looked interesting, but didn't work. I now have:

mapfile <"$file"; IFS= foo="${MAPFILE[*]}"

(without the unset, as it's in a function where it's harmless)



reply via email to

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