From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 10 May 2010 07:40:56 -0400 To: 9fans@9fans.net Message-ID: <6f3428794c36600244db89414a1ccd19@kw.quanstro.net> In-Reply-To: References: <4be4dd37.NDxcevbsQ+CfYFvN%yard-ape@telus.net> <104169d77ce3a909d635845ac86efc30@9netics.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Binary File split Topicbox-Message-UUID: 1ea991cc-ead6-11e9-9d60-3106f5b1d025 > but there's still a little annoyance - if the file size is an exact > multiple of the block size, it will generate an unnecessary zero-length > file at the end. sometimes what should work, doesn't. that (and the whitespace) are why my version is longer. > i tried to fix it to get rid of this, but ran hard up against awk's > dismalness. to illustrate: > > % seq 106908504 106908509 | awk '{print $1 % 4}' this isn't awk's fault. awk gets the right result. you've illustrated the dismalness of seq. ladd; seq 106908504 106908509 1.069085e+08 1.069085e+08 1.069085e+08 1.069085e+08 1.069085e+08 1.069085e+08 ladd; seq -f %8.f 106908504 106908509 | awk '{print $1 % 4}' 0 1 2 3 0 1 - erik