GNU bug report logs - #46048
split -n K/N loses data, sum of output files is smaller than input file.

Previous Next

Package: coreutils;

Reported by: Paul Hirst <contact <at> phirst.org>

Date: Sat, 23 Jan 2021 08:26:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: Paul Hirst <contact <at> phirst.org>, 46048 <at> debbugs.gnu.org
Subject: bug#46048: split -n K/N loses data, sum of output files is smaller than input file.
Date: Sun, 24 Jan 2021 11:55:27 -0800
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?




This bug report was last modified 4 years and 98 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.