> 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