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: [email protected] An: [email protected] Datum: 12. Okt. 00:19 Reply-To: [email protected] Message-ID: <[email protected]> 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 [email protected]
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
