Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Sep 2023 16:54:14 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Ede Wolf <listac@nebelschwaden.de>
Cc:        questions@freebsd.org
Subject:   Re: cut off last lines of a document
Message-ID:  <865y4qt2eh.fsf@ltc.des.no>
In-Reply-To: <ZPXusAY7mYSwpZH2@harpo.local> ("Andreas Kusalananda =?utf-8?B?S8OkaMOkcmkiJ3M=?= message of "Mon, 4 Sep 2023 16:50:24 %2B0200")
References:  <57be5495-97f8-4f22-9ae2-cd9712596e64@nebelschwaden.de> <uy2fdgobbejnhyctyyrbhgvhutuhtbzzxwg5wukdujyhw7h25u@74ujfxm5gjlk> <CAMtcK2qbc1jQHXJ%2Bwu0F62o6aDQKYAx3kYARuQFZLHS6DJktRg@mail.gmail.com> <a9b64c1d-02a6-45c1-aaed-85e4cf622776@nebelschwaden.de> <86edjet336.fsf@ltc.des.no> <ZPXusAY7mYSwpZH2@harpo.local>

next in thread | previous in thread | raw e-mail | index | archive | help
"Andreas Kusalananda K=C3=A4h=C3=A4ri" <kusalananda.kahari@gmail.com> write=
s:
> Note how this will handle backslash-escaped newlines in the input, and
> that, depending on the shell and its configuration, the "echo" call may
> or may not expand backslash-escaped characters in the input (e.g. "\n"
> and "\t").  The "echo" may also interpret the string "-n" as an option
> it occurs on its own line.  You may also lose flanking whitespace.

Right.  If your shell is broken, use read -r and replace echo with
printf "%s\n".  Or don't use a broken shell.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?865y4qt2eh.fsf>