public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: How do I split binaries to manageable chunks
@ 1999-06-21 10:11 Earnie Boyd
  1999-06-22 16:42 ` Joshua Rosen
  1999-06-30 22:10 ` Earnie Boyd
  0 siblings, 2 replies; 14+ messages in thread
From: Earnie Boyd @ 1999-06-21 10:11 UTC (permalink / raw)
  To: itz; +Cc: cygwin

--- itz@lbin.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.

===
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't include me)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: How do I split binaries to manageable chunks
  1999-06-21 10:11 How do I split binaries to manageable chunks Earnie Boyd
@ 1999-06-22 16:42 ` Joshua Rosen
  1999-06-30 22:10   ` Joshua Rosen
  1999-06-30 22:10 ` Earnie Boyd
  1 sibling, 1 reply; 14+ messages in thread
From: Joshua Rosen @ 1999-06-22 16:42 UTC (permalink / raw)
  To: cygwin

Earnie Boyd wrote:

> --- itz@lbin.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@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: How do I split binaries to manageable chunks
  1999-06-22 16:42 ` Joshua Rosen
@ 1999-06-30 22:10   ` Joshua Rosen
  0 siblings, 0 replies; 14+ messages in thread
From: Joshua Rosen @ 1999-06-30 22:10 UTC (permalink / raw)
  To: cygwin

Earnie Boyd wrote:

> --- itz@lbin.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@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: How do I split binaries to manageable chunks
  1999-06-21 10:11 How do I split binaries to manageable chunks Earnie Boyd
  1999-06-22 16:42 ` Joshua Rosen
@ 1999-06-30 22:10 ` Earnie Boyd
  1 sibling, 0 replies; 14+ messages in thread
From: Earnie Boyd @ 1999-06-30 22:10 UTC (permalink / raw)
  To: itz; +Cc: cygwin

--- itz@lbin.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.

===
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't include me)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: How do I split binaries to manageable chunks
  1999-06-22 16:55 John Wiersba
@ 1999-06-30 22:10 ` John Wiersba
  0 siblings, 0 replies; 14+ messages in thread
From: John Wiersba @ 1999-06-30 22:10 UTC (permalink / raw)
  To: 'Joshua Rosen', cygwin

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@geekspace.com ]
> Sent: Tuesday, June 22, 1999 7:38 PM
> To: cygwin@sourceware.cygnus.com
> Subject: Re: How do I split binaries to manageable chunks
> 
> 
> Earnie Boyd wrote:
> 
> > --- itz@lbin.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@sourceware.cygnus.com
> 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* How do I split binaries to manageable chunks
  1999-06-21  5:05 William S. Shu
@ 1999-06-30 22:10 ` William S. Shu
  0 siblings, 0 replies; 14+ messages in thread
From: William S. Shu @ 1999-06-30 22:10 UTC (permalink / raw)
  To: cygwin

Hello all,
I tried using the cygwin-20 split command (under windows 95) to split binary
files into manageable chunks.  This is for them to be transmitted down noisy
lines, and be reconstituted (cf. your split version of full.exe).
Unfortunately, it seems to handle only text files.

My question is/are:
1)    Could you please indicate to split and later recombine binary file(s)?
2)    Do I need to convert the file to a text equivalent before using split?
If so, what software can I use to do this?

Thanks

William.




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: How do I split binaries to manageable chunks
  1999-06-21  9:19 Phil Edwards
@ 1999-06-30 22:10 ` Phil Edwards
  0 siblings, 0 replies; 14+ messages in thread
From: Phil Edwards @ 1999-06-30 22:10 UTC (permalink / raw)
  To: cygwin, wshu

Ugh.  It seems that the 'split' utility isn't quite doing what it should.  If
you fix the source, your own files would provide an excellent testcase.  In
the meantime:


> 1)    Could you please indicate to split and later recombine binary file(s)?

Have you tried 'dd'?  The command-line syntax is a little funky, beware.


> 2)    Do I need to convert the file to a text equivalent before using split?
> If so, what software can I use to do this?

You don't /have/ to, but you can.  (For example, if you wanted to use some
other method of transferring.)  There are utilites to do MIME encoding on
the command line (say, mpack/munpack), and there are several UU* programs
out there (uuencode/uudecode).


(If you reply to the list, please don't cc another copy to me.  Thanks!)
Phil


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: How do I split binaries to manageable chunks
  1999-06-21  9:40 ` itz
@ 1999-06-30 22:10   ` itz
  0 siblings, 0 replies; 14+ messages in thread
From: itz @ 1999-06-30 22:10 UTC (permalink / raw)
  To: earnie_boyd; +Cc: wshu, cygwin

   Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
   Precedence: bulk
   Sender: cygwin-owner@sourceware.cygnus.com
   Delivered-To: mailing list cygwin@sourceware.cygnus.com
   Date: Mon, 21 Jun 1999 07:09:02 -0700 (PDT)
   From: Earnie Boyd <earnie_boyd@yahoo.com>
   Reply-To: earnie_boyd@yahoo.com
   MIME-Version: 1.0
   Content-Type: text/plain; charset=us-ascii

   --- "William S. Shu" <wshu@essex.ac.uk> wrote:

> Hello all,
> I tried using the cygwin-20 split command (under windows 95) to split binary
> files into manageable chunks.  This is for them to be transmitted down noisy
> lines, and be reconstituted (cf. your split version of full.exe).
> Unfortunately, it seems to handle only text files.
> 
> My question is/are:
> 1)    Could you please indicate to split and later recombine binary file(s)?
> 2)    Do I need to convert the file to a text equivalent before using split?
> If so, what software can I use to do this?

> Hmm.  The split program is part of the textutils package.  I just checked the
> cygwin source and find that it does not specify any file processing mode. :-(( 
> I suggest that you get the textutils package and properly port split.c by
> specifying the processing mode for the files being open both input and
> output.

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?


-- 
Ian Zimmerman
Lightbinders, Inc.
2325 3rd Street #324
San Francisco, California 94107
U.S.A.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: How do I split binaries to manageable chunks
  1999-06-21  7:08 Earnie Boyd
  1999-06-21  9:40 ` itz
@ 1999-06-30 22:10 ` Earnie Boyd
  1 sibling, 0 replies; 14+ messages in thread
From: Earnie Boyd @ 1999-06-30 22:10 UTC (permalink / raw)
  To: William S. Shu, cygwin

--- "William S. Shu" <wshu@essex.ac.uk> wrote:
> Hello all,
> I tried using the cygwin-20 split command (under windows 95) to split binary
> files into manageable chunks.  This is for them to be transmitted down noisy
> lines, and be reconstituted (cf. your split version of full.exe).
> Unfortunately, it seems to handle only text files.
> 
> My question is/are:
> 1)    Could you please indicate to split and later recombine binary file(s)?
> 2)    Do I need to convert the file to a text equivalent before using split?
> If so, what software can I use to do this?

Hmm.  The split program is part of the textutils package.  I just checked the
cygwin source and find that it does not specify any file processing mode. :-(( 
I suggest that you get the textutils package and properly port split.c by
specifying the processing mode for the files being open both input and output.
===
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't include me)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: How do I split binaries to manageable chunks
@ 1999-06-22 16:55 John Wiersba
  1999-06-30 22:10 ` John Wiersba
  0 siblings, 1 reply; 14+ messages in thread
From: John Wiersba @ 1999-06-22 16:55 UTC (permalink / raw)
  To: 'Joshua Rosen', cygwin

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@geekspace.com ]
> Sent: Tuesday, June 22, 1999 7:38 PM
> To: cygwin@sourceware.cygnus.com
> Subject: Re: How do I split binaries to manageable chunks
> 
> 
> Earnie Boyd wrote:
> 
> > --- itz@lbin.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@sourceware.cygnus.com
> 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: How do I split binaries to manageable chunks
  1999-06-21  7:08 Earnie Boyd
@ 1999-06-21  9:40 ` itz
  1999-06-30 22:10   ` itz
  1999-06-30 22:10 ` Earnie Boyd
  1 sibling, 1 reply; 14+ messages in thread
From: itz @ 1999-06-21  9:40 UTC (permalink / raw)
  To: earnie_boyd; +Cc: wshu, cygwin

   Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
   Precedence: bulk
   Sender: cygwin-owner@sourceware.cygnus.com
   Delivered-To: mailing list cygwin@sourceware.cygnus.com
   Date: Mon, 21 Jun 1999 07:09:02 -0700 (PDT)
   From: Earnie Boyd <earnie_boyd@yahoo.com>
   Reply-To: earnie_boyd@yahoo.com
   MIME-Version: 1.0
   Content-Type: text/plain; charset=us-ascii

   --- "William S. Shu" <wshu@essex.ac.uk> wrote:

> Hello all,
> I tried using the cygwin-20 split command (under windows 95) to split binary
> files into manageable chunks.  This is for them to be transmitted down noisy
> lines, and be reconstituted (cf. your split version of full.exe).
> Unfortunately, it seems to handle only text files.
> 
> My question is/are:
> 1)    Could you please indicate to split and later recombine binary file(s)?
> 2)    Do I need to convert the file to a text equivalent before using split?
> If so, what software can I use to do this?

> Hmm.  The split program is part of the textutils package.  I just checked the
> cygwin source and find that it does not specify any file processing mode. :-(( 
> I suggest that you get the textutils package and properly port split.c by
> specifying the processing mode for the files being open both input and
> output.

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?


-- 
Ian Zimmerman
Lightbinders, Inc.
2325 3rd Street #324
San Francisco, California 94107
U.S.A.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: How do I split binaries to manageable chunks
@ 1999-06-21  9:19 Phil Edwards
  1999-06-30 22:10 ` Phil Edwards
  0 siblings, 1 reply; 14+ messages in thread
From: Phil Edwards @ 1999-06-21  9:19 UTC (permalink / raw)
  To: cygwin, wshu

Ugh.  It seems that the 'split' utility isn't quite doing what it should.  If
you fix the source, your own files would provide an excellent testcase.  In
the meantime:


> 1)    Could you please indicate to split and later recombine binary file(s)?

Have you tried 'dd'?  The command-line syntax is a little funky, beware.


> 2)    Do I need to convert the file to a text equivalent before using split?
> If so, what software can I use to do this?

You don't /have/ to, but you can.  (For example, if you wanted to use some
other method of transferring.)  There are utilites to do MIME encoding on
the command line (say, mpack/munpack), and there are several UU* programs
out there (uuencode/uudecode).


(If you reply to the list, please don't cc another copy to me.  Thanks!)
Phil


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: How do I split binaries to manageable chunks
@ 1999-06-21  7:08 Earnie Boyd
  1999-06-21  9:40 ` itz
  1999-06-30 22:10 ` Earnie Boyd
  0 siblings, 2 replies; 14+ messages in thread
From: Earnie Boyd @ 1999-06-21  7:08 UTC (permalink / raw)
  To: William S. Shu, cygwin

--- "William S. Shu" <wshu@essex.ac.uk> wrote:
> Hello all,
> I tried using the cygwin-20 split command (under windows 95) to split binary
> files into manageable chunks.  This is for them to be transmitted down noisy
> lines, and be reconstituted (cf. your split version of full.exe).
> Unfortunately, it seems to handle only text files.
> 
> My question is/are:
> 1)    Could you please indicate to split and later recombine binary file(s)?
> 2)    Do I need to convert the file to a text equivalent before using split?
> If so, what software can I use to do this?

Hmm.  The split program is part of the textutils package.  I just checked the
cygwin source and find that it does not specify any file processing mode. :-(( 
I suggest that you get the textutils package and properly port split.c by
specifying the processing mode for the files being open both input and output.
===
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't include me)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* How do I split binaries to manageable chunks
@ 1999-06-21  5:05 William S. Shu
  1999-06-30 22:10 ` William S. Shu
  0 siblings, 1 reply; 14+ messages in thread
From: William S. Shu @ 1999-06-21  5:05 UTC (permalink / raw)
  To: cygwin

Hello all,
I tried using the cygwin-20 split command (under windows 95) to split binary
files into manageable chunks.  This is for them to be transmitted down noisy
lines, and be reconstituted (cf. your split version of full.exe).
Unfortunately, it seems to handle only text files.

My question is/are:
1)    Could you please indicate to split and later recombine binary file(s)?
2)    Do I need to convert the file to a text equivalent before using split?
If so, what software can I use to do this?

Thanks

William.




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~1999-06-30 22:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-21 10:11 How do I split binaries to manageable chunks Earnie Boyd
1999-06-22 16:42 ` Joshua Rosen
1999-06-30 22:10   ` Joshua Rosen
1999-06-30 22:10 ` Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
1999-06-22 16:55 John Wiersba
1999-06-30 22:10 ` John Wiersba
1999-06-21  9:19 Phil Edwards
1999-06-30 22:10 ` Phil Edwards
1999-06-21  7:08 Earnie Boyd
1999-06-21  9:40 ` itz
1999-06-30 22:10   ` itz
1999-06-30 22:10 ` Earnie Boyd
1999-06-21  5:05 William S. Shu
1999-06-30 22:10 ` William S. Shu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).