Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <03F4742D8225D21191EF00805FE62B990205E16C@AA-MSG-01> From: John Wiersba To: "'Joshua Rosen'" , cygwin AT sourceware DOT cygnus DOT com Subject: RE: How do I split binaries to manageable chunks Date: Tue, 22 Jun 1999 19:55:33 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Looks to me like split -b or split -c should do a binary split and otherwise it should do a text-mode split. I think this is a good example of how hard it is to always "do the right thing" in binary mode vs text mode land. That's why I use binary mounts and hand convert (unix2dos or dos2unix) files to the right mode as needed. -- John > -----Original Message----- > From: Joshua Rosen [mailto:rozzin AT geekspace DOT com] > Sent: Tuesday, June 22, 1999 7:38 PM > To: cygwin AT sourceware DOT cygnus DOT com > Subject: Re: How do I split binaries to manageable chunks > > > Earnie Boyd wrote: > > > --- itz AT lbin DOT com wrote: > > -8<- > > > Well, this looks exactly like the situation that shows > the ultimate > > > futility of trying to accomodate MSDOG text files. How > is split to > > > know what type of file it is handling? Should we embed a copy of > > > file(1) into split? Stoop down to MSDOG practice and rely on file > > > names? Or what? > > > > The utility split should just always process in binary mode. > > Given that the `split' utility is meant to split text > files, it should > definitely -not- -always- process in binary mode, if only > because splitting a > multibyte newline character down the middle, putting part of > the `single > character' at the end of one file, and the rest of the > character at the > beginning of another file, is probaly not the best of ideas.... > Though, in response to Ian's comments: it might be nice > to have to option > of splitting in binary mode, but embedding a version of > file(1) into split(1) > really isn't necessary to do that--all that'd be needed is a > command-line flag > to run split in binary mode. > Again, UUEncoding the binary file and then splitting it > is an option, too, > but probably not the most desirable, because it adds two > steps, every time you > want to go through this procedure, and it gives you a larger > file to split. > As Phil said, one could use dd, but that's sort of > cumbersome, so one could > write up a shell script to simplify things, but it probably > would be easier to > just code a binary version of split, or, as has already been > suggested, change > the mode in the existing version and call it `bsplit' or something. > > Dit I miss anything? > -Rozzin. > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com