bug-coreutils
[Top][All Lists]
Advanced

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

bug#68892: 'tr' function | Outputs printed before the command prompts


From: Davide Brini
Subject: bug#68892: 'tr' function | Outputs printed before the command prompts
Date: Fri, 2 Feb 2024 15:57:20 +0100

On Fri, 2 Feb 2024 16:40:26 +0200, Ricky Tigg <ricky.tigg@gmail.com> wrote:

> OS: Fedora v86_64. coreutils v.: 9.3. Shell: bash v. 5.2.26.
>
> Hello. Normally outputs are printed after the command prompt; "#" "$" on
> my system.
>
> (...)@(...):~$ rpm -ql coreutils | head -2
> /usr/bin/[
> /usr/bin/arch
>
> Unexpectedly, through a pipe invoking 'tr', outputs are printed before the
> command prompts.
>
> (...)@(...):~$ rpm -ql coreutils | head -2 | tr '\n' ' '
> /usr/bin/[ /usr/bin/arch (...)@(...):~$

You're removing newlines, and this causes the prompt to be displayed
immediately after the command output without an intervening newline.

--
D.





reply via email to

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