Walt Mankowski on Mon, 4 Nov 2002 21:19:07 -0500 |
On Mon, Nov 04, 2002 at 08:27:21PM -0500, gabriel rosenkoetter wrote: > On Mon, Nov 04, 2002 at 06:33:13PM -0500, Walt Mankowski wrote: > > That might be an issue in general, but it this case it will work just > > fine. copy /b foo+bar baz will reconstruct the file without changing > > anything in foo or bar. > > It will only work right if split(1) and DOS's copy think line > endings are the same character. It *will* fail if they disagree. Why do you think DOS's copy command cares about end of line characters? > Are you suggesting that DOS's copy magically figures out what kind > of line-ending existed previously? What about what split(1) does > when there are two EOLs in a row? Not at all. The original poster said he had a binary file, and DOS's copy command has a /b option to treat the input file as-is. Actually copy will handle the linefeeds just fine (that is, it would keep them as linefeeds and not add the carriage returns). The reason for the /b option is eof characters. DOS used to treat C-z (ascii 26) as an end of file marker, and the /b told it to keep reading past the first C-z it found. Attachment:
pgpHUpGYOt7Lf.pgp
|
|