bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58468: bug in my tr, version (GNU coreutils) 9.1


From: Chris Elvidge
Subject: bug#58468: bug in my tr, version (GNU coreutils) 9.1
Date: Wed, 12 Oct 2022 15:21:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4



On 11/10/2022 23:47, Anton Wessel wrote:
in OS KNOPPIX 9.1

your email:
+++++

Verzeichnis: Anton_Wessel@t-onli…/INBOX
Betreff: Welcome to the "Bug-coreutils" mailing list (Digest mode)
Von: bug-coreutils-request@gnu.org
An: Anton_Wessel@t-online.de
Datum: 12. Okt.  00:19
Reply-To: bug-coreutils-request@gnu.org
Message-ID: <mailman.163.1665526797.1198.bug-coreutils@gnu.org>
Größe: 3,29 KB


-----

test:

echo -e "a\n\nb" | tr -s '\n'

or

echo -e "a\n\nb" | tr -s '\n' '\n'

You have only one empty line! You need 3 \n to get two empty lines.

$ echo -e "a\n\n\nb"
a


b



both empty lines are removed, not only one.

Please: is there a wayaround known?


Regards

Anton_Wessel@t-online.de



Put your output through hexdump -c
You will see:

$ echo -e "a\n\n\nb" | hexdump -c
0000000   a  \n  \n  \n   b  \n
0000006

$ echo -e "a\n\n\nb" | tr -s '\n' | hexdump -c
0000000   a  \n   b  \n
0000004





reply via email to

[Prev in Thread] Current Thread [Next in Thread]