Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ncar!gatech!hubcap!ncrcae!sauron!wescott From: wescott@sauron.Columbia.NCR.COM (Mike Wescott) Newsgroups: comp.sources.d Subject: Re: bsplit (binary file split) Message-ID: <1512@sauron.Columbia.NCR.COM> Date: 19 Dec 88 18:05:57 GMT References: <1988Dec18.101912.5463@lsuc.uucp> Reply-To: wescott@sauron.Columbia.NCR.COM (Mike Wescott) Organization: Entry Level Systems Development, NCR Corp., Columbia, SC Lines: 22 In article <1988Dec18.101912.5463@lsuc.uucp> dave@lsuc.uucp (David Sherman) writes: > Uh, why do you need a new tool for this? > > dd bs=512 count=100 if=$1 of=xaa > dd bs=512 skip=100 count=100 if=$1 of=xab > dd bs=512 skip=200 count=100 if=$1 of=xac There is an even easier way to shell script this. You can avoid the skip= by using stdin: for i in xaa xab xac ... do dd count=100 of=$i done < $1 Or even do it "right" and completely emulate split... We actually hacked a flag into the split(1) to do the split in terms of blocks rather than lines. -- -Mike Wescott mike.wescott@ncrcae.Columbia.NCR.COM