[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiline editing breaks if the previous output doesn't end in newli
From: |
Dennis Williamson |
Subject: |
Re: Multiline editing breaks if the previous output doesn't end in newline |
Date: |
Sun, 30 Oct 2022 17:01:32 -0500 |
On Sun, Oct 30, 2022 at 4:41 PM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
wrote:
>
>
> i coded a files tree to bash code via gawk reading and printing bash code
> i did noeol no newline at end
> logically , cause , who wants var='from file\n'
>
> >
>
Because command substitution strips trailing newlines?
$ echo -e 'foo\n\n\n'
foo
$ s=$(echo -e 'foo\n\n\n')
$ declare -p s
declare -- s="foo"
No gyrations needed.
--
Visit serverfault.com to get your system administration questions answered.
Re: Multiline editing breaks if the previous output doesn't end in newline, Oğuz, 2022/10/30
Re: Multiline editing breaks if the previous output doesn't end in newline, Chet Ramey, 2022/10/31