bug-bash
[Top][All Lists]
Advanced

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

Re: Trailing newlines disappear


From: Greg Wooledge
Subject: Re: Trailing newlines disappear
Date: Thu, 8 Jun 2017 16:56:37 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Jun 08, 2017 at 10:44:29PM +0200, Geir Hauge wrote:
> You can pick one of these instead:
> 
>     mapfile < "$file"; IFS= foo="${MAPFILE[*]}"; unset -v IFS
> 
> or
> 
>     mapfile < "$file"; printf -v foo %s "${MAPFILE[@]}"

or

    lambda() { local MAPFILE IFS=; mapfile < "$file"; foo="${MAPFILE[*]}"; }
    lambda



reply via email to

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