coreutils
[Top][All Lists]
Advanced

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

Re: split: support unlimited number of split files


From: Pádraig Brady
Subject: Re: split: support unlimited number of split files
Date: Sat, 10 Mar 2012 12:16:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 03/10/2012 11:13 AM, Jérémy Compostella wrote:

> BTW, reviewing your changes I discovered that when a user specifies a
> suffix length zero the old behavior was to use the default length of 2
> and the new is, of course, the suffix auto length way.

Well spotted. I noticed that too, but thought 0 = auto (default) was ok.

> However, IMHO,
> it's dangerous to not raise an error. If a user for example make a
> script which use split with a shell variable for the suffix_length
> option it could have the feeling that his script works fine although it
> provides a suffix length zero.

Though if there was an existing script as follows we'd break it.

sl=0 #default
[ "$some_condition" ] && sl=5
split -a $sl ...

> I attached an independent patch since there is no semantic relationship
> with the current one. Feel free to merge, review or refuse it.

I'm inclined to think this is fine as is.

cheers,
Pádraig.



reply via email to

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