[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trailing newlines disappear
From: |
PePa |
Subject: |
Re: Trailing newlines disappear |
Date: |
Fri, 9 Jun 2017 03:34:39 +0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
On 09/06/2560 02:14, Greg Wooledge wrote:
> Well, it leaves IFS changed, because you didn't revert or unset it,
> or run the entire thing in a function with local IFS. Also, I'd use
> "${MAPFILE[*]}" to reinforce that you are joining an array into a string,
> rather than expanding the array as a list.
Thanks for pointing all this out. I settled on:
mapfile <"$file"; IFS= foo=${MAPFILE[*]} true
Again, much faster than a subshell. Are there order guarantees in the
case of "a=x b=y command"??
Peter
- Trailing newlines disappear, PePa, 2017/06/08
- Re: Trailing newlines disappear, Greg Wooledge, 2017/06/08
- Re: Trailing newlines disappear, Peter & Kelly Passchier, 2017/06/08
- Re: Trailing newlines disappear,
PePa <=
- Re: Trailing newlines disappear, Geir Hauge, 2017/06/08
- Re: Trailing newlines disappear, Peter & Kelly Passchier, 2017/06/08
- Re: Trailing newlines disappear, Greg Wooledge, 2017/06/08
- Re: Trailing newlines disappear, Eduardo Bustamante, 2017/06/08
- Re: Trailing newlines disappear, Peter & Kelly Passchier, 2017/06/08
- Re: Trailing newlines disappear, Greg Wooledge, 2017/06/09
- Re: Trailing newlines disappear, Chet Ramey, 2017/06/09
- Re: Trailing newlines disappear, Greg Wooledge, 2017/06/09
- Re: Trailing newlines disappear, Chet Ramey, 2017/06/09
- Re: Trailing newlines disappear, L A Walsh, 2017/06/09