[Help-bash] Is there a way to not to remove tailing newline in command s
From:
Peng Yu
Subject:
[Help-bash] Is there a way to not to remove tailing newline in command substitution?
Date:
Wed, 12 Dec 2018 21:32:33 -0600
Hi,
Sometimes, it may be better to preserve the trailing newline in a
command substitution. Is there a way to do so? Thanks.
$ x=$(echo $'\n')
$ declare -p x
declare -- x=""
--
Regards,
Peng