bug-coreutils
[Top][All Lists]
Advanced

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

bug#46048: split -n K/N loses data, sum of output files is smaller than


From: Pádraig Brady
Subject: bug#46048: split -n K/N loses data, sum of output files is smaller than input file.
Date: Mon, 25 Jan 2021 14:21:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 24/01/2021 19:55, Paul Eggert wrote:
On 1/24/21 8:52 AM, Pádraig Brady wrote:
-      if (lseek (STDIN_FILENO, start, SEEK_CUR) < 0)
+      if (lseek (STDIN_FILENO, start, SEEK_SET) < 0)

Dumb question: will this handle the case where you're splitting from
stdin and stdin is a seekable file and its initial file offset is nonzero?

Right. Following on the logic from input_file_size(),
I'm going with the attached, which I'll push later.
Marking this as done.

thanks,
Pádraig

Attachment: split-k_of_n.patch
Description: Text Data


reply via email to

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