Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ecsvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!mcnc!ecsvax!dgary From: dgary@ecsvax.UUCP (D Gary Grady) Newsgroups: net.micro.pc Subject: Re: Appending to files. (pc-dos, ms-dos) Message-ID: <908@ecsvax.UUCP> Date: Fri, 13-Dec-85 11:02:17 EST Article-I.D.: ecsvax.908 Posted: Fri Dec 13 11:02:17 1985 Date-Received: Sun, 15-Dec-85 00:25:39 EST References: <900@ecsvax.UUCP> Reply-To: dgary@ecsvax.UUCP (D Gary Grady) Distribution: net Organization: Duke U Comp Ctr Lines: 28 Keywords: EOF Summary: Dealing with ^Z in the middle of a file In article <900@ecsvax.UUCP> hes@ecsvax.UUCP (Henry Schaffer) writes: > > type test > test2 > type test >> test2 > >test2 ends up the correct size (in the dir listing), but type test2 >only gives *one* copy of test. A quick list using debug shows that >appending leaves the end-of-file-marker (^Z, hex 1A) in place and >appends after it. So "type" stops at the first EOF and doesn't ever >show the second copy of "test". The practice of marking end-of-file with a ^Z is a #$%^& "feature" of DOS that comes from CP/M, where no directory information was kept on the true length of a file in bytes. Since DOS *does* keep the actual length, it serves no useful purpose to use ^Z. In fact, almost all programs and DOS commands (including TYPE) are quite happy working with files that lack a terminating ^Z. So I blame Henry's problem not on >> but on TYPE (for not ignoring ^Z) and mainly on his text editor, for creating a ^Z to begin with. I'd suggest he consider (1) checking his editor to see if the ^Z can be turned off (as it can with PC-Write, for example), (2) modifying the editor's object code to the same effect, or (3) using a better editor. -- D Gary Grady Duke U Comp Center, Durham, NC 27706 (919) 684-3695 USENET: {seismo,decvax,ihnp4,akgua,etc.}!mcnc!ecsvax!dgary