GNU bug report logs - #9455
RFE: split --balanced

Previous Next

Package: coreutils;

Reported by: Dave Yost <Dave <at> Yost.com>

Date: Wed, 7 Sep 2011 01:02:01 UTC

Severity: wishlist

Fixed in version 8.8

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

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dave Yost <Dave <at> Yost.com>
To: bug-coreutils <at> gnu.org
Subject: RFE: split --balanced
Date: Tue, 6 Sep 2011 17:55:51 -0700
[Message part 1 (text/plain, inline)]
Z% for x in 1 2 3 4 5 6 7
for> do echo $x ; done | split --lines=3 \
pipe> && for x in x?? ; do echo "=== $x" ; cat $x ; done
=== xaa
1
2
3
=== xab
4
5
6
=== xac
7

In some applications, you would like split to more evenly apportion 
the output to the files, like this:

Z% for x in 1 2 3 4 5 6 7
for> do echo $x ; done | split --balanced --lines=3 \
pipe> && for x in x?? ; do echo "=== $x" ; cat $x ; done
=== xaa
1
2
3
=== xab
4
5
=== xac
6
7
[Message part 2 (text/html, inline)]

This bug report was last modified 13 years and 339 days ago.

Previous Next


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