Date : Thu, 03 Jan 1991 00:06:21 GMT
From : usc!cs.utexas.edu!ut-emx!austex!roadhog@ucsd.edu (Lindsay Haisley)
Subject: Help with embedded ^Z
jin@spdcc.COM (Jerry Natowitz) writes:
> I was adding some control characters to a text file for a printer and,
> without realising the consequences, added a control Z in the first line
> of the file.
>
> I've tryed using pip thus:
> >pip
> *a.a=b.b[osStuff^Z]
>
> Where "Stuff" is a string that occurs in the second block of the file.
>
> No luck, Word Master still won't edit the file. I don't have a lot of
> the utilities around, BASIC-80 and PIP usually do the trick. I tryed
> reading the file in BASIC, no luck.
>
> Any help would be appreciated ...
> --
> Jerry Natowitz
> Guest user on:
> ARPA jin@ursa-major.spdcc.com
> UUCP {ima,harvard,rayssd,linus,m2c}!spdcc!jin
Your problem is a relatively simple one but requires the right tool, in
this case any one of several will do. A public domain program called
SZAP is available on many BBS's around which is a "binary" file editor,
which is to say that it doesn't recognize ^Z as an EOF marker and allows
you to change bytes anywhere in the file. An other utility which will do
the job is a disk editor. Two of them DU (many versions around) and SODU
(which is screen oriented and must be taylored for individual terminals) are
fairly common. These programs allow you to edit disks by track and sector
or by group, which is the logical data unit referenced in the CP/M
directory
The easiest solution, if the file is small, is to use DDT, or any other
debugger, load the file into memory (it must all fit), change the offending
^Z to whatever, quit DDT and SAVE the appropriate number of pages to the
filename of your choice.
Lindsay Haisley
"Everything works if you let it!"
--- The Roadie
++++++++++++++++++++++++++
uucp: cs.utexas.edu!ut-emx!austex!roadhog
BBS: (512) 259-1261 (Z-Node 77 - aka - Kaypro Club of Austin)