gabriel rosenkoetter on Tue, 5 Nov 2002 08:52:06 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] split & cat


On Mon, Nov 04, 2002 at 09:18:35PM -0500, Walt Mankowski wrote:
> Why do you think DOS's copy command cares about end of line
> characters?

I don't think it does. But I think split(1) may or may not insert
EOLs if you tell it to split the file along byte boundaries. Which
means that, if your binary file *had* ^Js or ^Ms in it, you may
mysteriously end up with too many when copy rejoins the files. It'd
sort of be split(1)'s fault, but not really, since it *told* you it
wanted to deal with "lines", not with bytes.

The point is, btw, less what GNU split(1) (or anyone else's) does or
doesn't do, and more that the behavior is NOT specified by a
standard, whereas dd(1)'s is. The latter is specifically made to
do byte- and block-boundary divisions of files. (It's also made to
reblock data for different media, but it doesn't have to do that
here.)

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpziFlDQt3Wf.pgp
Description: PGP signature