Changing characters in a file
Hi,
I need to two write two small programs and was wondering what the best
method of achieving it is for any modern-ish version of Windows (XP,
2000, upwards).
The first program needs to run through a data file with known filename
character by character, changing the non-text characters 01 5F (in hex)
to 01 60 (in hex), and the second program does the same thing in
reverse. Nothing else in the files can be altered, including the
filename.
The programs need to be as small as possible, but also easy as possible
for me to write.
_
_/ \___
Anony-mouse says o_/O _/ \
"Eek-eek-eek!" \__/_|_/_|\____/
Re: Changing characters in a file
In article <200320071816415604%anony-mouse@hole.in.the.wall.com>,
Anony-mouse <anony-mouse@hole.in.the.wall.com> wrote:
[color=blue]
> Hi,
>
> I need to two write two small programs and was wondering what the best
> method of achieving it is for any modern-ish version of Windows (XP,
> 2000, upwards).
>
> The first program needs to run through a data file with known filename
> character by character, changing the non-text characters 01 5F (in hex)
> to 01 60 (in hex), and the second program does the same thing in
> reverse. Nothing else in the files can be altered, including the
> filename.
>
> The programs need to be as small as possible, but also easy as possible
> for me to write.[/color]
I've tried using a version Sed, which might have worked, but the file
contains at least one EOF (hex A1) control code before the actual end
of the file.