Path: utzoo!utgpu!watmath!clyde!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.sources.d Subject: Re: bsplit (binary file split) Message-ID: <7224@chinet.chi.il.us> Date: 19 Dec 88 15:39:25 GMT References: <1988Dec18.101912.5463@lsuc.uucp> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 24 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 Is there a way to do this using piped input? I once wanted to re-split the GNU emacs tar distribution and could not come up with a way to do it with the standard tools. It was in 17 files of approximately 200K and I wanted to make files of about 360K to store on PC disks. I did not have enough disk space for a 3rd copy so I was trying to use: cat * |script_using_dd but could not make it work. >If you need a more general tool, it'd be simple enough to >hack up a sh loop using expr to increment the skip and output-file >arguments appropriately. That was the approach I used in the script (minus the skip of course) but it did not seem to work, perhaps due to stdio buffering in the pipe getting lost between successive executions of dd. Les Mikesell