Re: any plans for command substitution that preserves trailing newlines?
From:
ikhxcsz7y xmbott
Subject:
Re: any plans for command substitution that preserves trailing newlines?
Date:
Wed, 26 Jan 2022 00:48:29 +0100
yea well no posix def no such
happy coding
On Wed, Jan 26, 2022, 00:47 Christoph Anton Mitterer <calestyo@scientia.net>
wrote:
> On Wed, 2022-01-26 at 00:37 +0100, Alex fxmbsw7 Ratchev wrote:
> > mapfile -d '' a < <(printf my\\n\\n ) ; declare -p a
> > declare -a a=([0]=$'my\n\n')
>
> Thanks, but the original goal was something that works in bash *and*
> other POSIX compatible shells :-)
>
> Cheers,
> Chris.
>
>