Change V1.1 (2004-02-08) By Anders Persson (
Change [VERBOSE] FILE < name> FROM < string1>|ASCII < nr> [< nr> < nr> ...]
       TO < string2>|ASCII < nr> [< nr> < nr> ...]
       [FIRST < nr>]  [LAST < nr>]

       [THEN FROM < string1>|ASCII < nr> [< nr> < nr> ...]
       TO < string2>|ASCII < nr> [< nr> < nr> ...]
       [FIRST < nr>]  [LAST < nr>]]

       [THEN ...]

This command replaces all occurrences of < string1> to < string2> in the
file < name>. If FIRST < nr> is specified, only the first < nr> occurrences
are replaced. LAST works in the same way, but backwards.

Typical usage example:
Change file homepage.html from to verbose

If you state FROM ASCII < nr> instead of FROM < string>, then the string to
be replaced will contain the characters with the ascii numbers specified,
for example ASCII 10 13 specifies a two character long string.
(10= Line feed, 13= return, PC text files uses both on each line while
amiga text files only use ascii 10 (line feed)). Any number 0-255 can be used.

If you want the string to be deleted instead of replaced, set TO to "" (or '').

The searching is case sensitive if the FROM string is only one character
long. If it is longer, it's not case sensitive.

Using the THEN option lets you replace more than one thing. It's just like
running this program more than once on the same file, except for that the
file not is written to disk until all changes has been made. For example:
Change FILE test.txt from ascii 10 10 to  THEN from ascii 10 to " " THEN from  to ascii 10
(formats a text from LF after every line to LF after every text part.)

The number returned by Change is the number of replacements actually
performed. Using the VERBOSE option, you will get more information.
VERBOSE should be stated before first THEN command to include all rounds.

Change is also useful together with the LIST LFORMAT command, for example:
List > ram:ex LFORMAT "Change verbose file %s from ascii 13 to ''" #?.html
execute ram:ex

Any files can be changed, but with executables you should replace text with
text of the same length! Also note that you need about twice as much free
memory as the file size.

Download? It's inside the Selector archive.
Back to Selector - Boray's Amiga page