Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!eecae!cps3xx!gcook From: gcook@cps3xx.UUCP (Greg Cook) Newsgroups: comp.sys.ibm.pc Subject: Re: append " >> " is not working, why? Message-ID: <4615@cps3xx.UUCP> Date: 15 Sep 89 12:43:38 GMT References: <2553@pur-phy> Sender: usenet@cps3xx.UUCP Lines: 44 From article <2553@pur-phy>, by qz@maxwell.physics.purdue.edu (Qin Zhao): > Hi, I recently got some problem when I tried to concatenate two files. > What I have done is following: > There is tow file: file1 and file2 ( I got from somebody else ). > I gave command: > type file2 >> file1 > in order to put file2 at the end of file1. And then I used "dir" to check > the size of file1, it was increased by the size of file2. > However, when I tried to read the contents of file1, I could only see the > original part of file1. I had used several editors, and "type" commands. > But when I rewrote file1 using the editor, the size of file1 drops to the > original size of file1. > I guess that file1 and file2 were created in old version (3.0 ) DOS, and > the end-of-file character may be not recognized by the new version ( 3.3) of > DOS. But I am not sure how this can happen, and how can I solve this problem. > I would be very much appreciated, if somebody can provide some information. I think you are on the right track. I know that the type command stops when it encounters an EOF. You did not mention what type of system you have, and I think this is more pronounced on some systems than other(but I could be wron, I often am :-). When you are appending, the EOF at the end of file1 is not erased and type will "type" up to that EOF, and thinking it is done, will ignore the rest. This is also true for some word processors and editors. And what it sounds like is that when you save your file, the appended file was not brought into your editor so it saved only what it read in, file1. WHat you need to do is find a word processor or editor, that ignores the EOF (cntrl-z or ASCII 26) when it reads in your file, and then go through and delete the EOF after file1. I think this can be done in WORD or WORDPERFECT. I don't know about any others. For more information, see "The Help Screen", PC WORLD, Oct. 89. (Interesting that I just read this yesterday, when I got my magazine) BTW, I don't think my previous statement is correct, about this being a problem on some machines and not others. Hope this helps! ========================================================================= Greg Cook All good things come through chemistry! gcook@horus.cem.msu.edu cook@frith.egr.msu.edu