File Splitting

plug@arcticmail.com plug@arcticmail.com
Thu, 7 Dec 2000 14:52:38 -0700


LOL!  Dude, that "head/tail" thing just HAS to
go into SOME kind of "Hall of Fame."  Of course,
for the binary version, I reckon you would do
something along the lines of

dd bs=1024k count=1 if=infil >foo.01
dd bs=1024k count=2 if=infil | dd bs=1024k skip=1 >foo.02
dd bs=1024k count=3 if=infil | dd bs=1024k skip=2 >foo.03


D

* On Wed, Dec 06, 2000 at 07:51:03AM -0700, sinck@ugive.com wrote:
> 
> 
> \_ 
> \_ What???  Everyone DOESN'T instinctively
> \_ think to do
> \_ 
> \_ sed -n '1,99p' < infil >foo.01
> \_ sed -n '100,199p' < infil >foo.02
> \_ sed -n '200,299p' < infil >foo.03
> \_ sed -n '300,399p' < infil >foo.04
> \_ sed -n '400,499p' < infil >foo.05
> 
> Ooo...that's more graceful than what I sed about using head + tail...
> 
> head -100 infil > foo.01
> head -200 infil | tail -100 > foo.02
> head -300 infil | tail -100 > foo.02
> head -400 infil | tail -100 > foo.02
> ....
> 
> David