[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Is there a way to not to remove tailing newline in comma
Re: [Help-bash] Is there a way to not to remove tailing newline in command substitution?
Wed, 12 Dec 2018 21:57:56 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1
On 12/12/18 9:32 PM, Peng Yu wrote:
Sometimes, it may be better to preserve the trailing newline in a
command substitution. Is there a way to do so? Thanks.
Yes. Forcefully end your command substitution with a non-newline
sentinel, then strip it after the fact:
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org