bug-coreutils
[Top][All Lists]
Advanced

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

bug#70699: Possible bug in /usr/bin/paste


From: Art Shelest
Subject: bug#70699: Possible bug in /usr/bin/paste
Date: Wed, 1 May 2024 16:32:46 +0000

Yes, this is the bug.

Will you please fix it?


-----Original Message-----
From: Pádraig Brady <pixelbeat@gmail.com> On Behalf Of Pádraig Brady
Sent: Wednesday, May 1, 2024 12:25 PM
To: Art Shelest <ashelest@browarddefender.org>; 70699@debbugs.gnu.org
Subject: [External] Re: bug#70699: Possible bug in /usr/bin/paste

On 01/05/2024 15:28, Art Shelest via GNU coreutils Bug Reports wrote:
> Good morning,
> 
> I am seeing an aberrant behavior from the /usr/bin/paste utility when working 
> with Windows-style CR/LF text files.
> The repro is for Mint Mate (Virginia).
> 
> If I change the line endings in the first file to Unix format (LF), it works 
> as expected.
> If I change the line endings to Max (CR), it breaks even worse.
> 
> $ hexdump -C letters.txt
> 00000000  61 61 09 41 41 0d 0a 62  62 09 42 42 0d 0a        |aa.AA..bb.BB..|
> 
> $ cat letters.txt
> aa   AA
> bb   BB
> $ cat numbers.txt
> 1
> 2
> $ paste letters.txt numbers.txt
> aa   1A
> bb   2B
> $
> 
> 
> Expected:
> $ paste letters.txt numbers.txt
> aa   AA   1
> bb   BB   2
> 
> Thank you.
> 

paste(1) is treating the CR like a standard character, and when outputting that 
back to the terminal it "messes up" the expected output.
I suggest you convert any such files to unix format before processing.

thanks,
Pádraig

reply via email to

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