On Fri, 2 Feb 2024 16:40:26 +0200, Ricky Tigg <ricky.t...@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.