EasyManua.ls Logo

Commodore PC 40 - Page 301

Commodore PC 40
494 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Replace
Purpose:
Replaces all
occurrences
of
a
string
of
text
in a range
with
a different string
of
text.
Syntax:
[line)[ ,line)[? Jrtextl CONTROL·Z text2
Comments:
The
first
and
second
line
options
specify
the
range
of
lines
that
the
R
(replace)
command
uses. Each
time
edlin
finds
textl,
it
replaces it
with
text2, displaying each line that changes. If a line
contains
two
or
more
replacements, it
is
displayed
once
for
each
change.
When
edlin has
made
all
the
changes,
the
R
command
ends
and
the
asterisk
prompt
reappears.
If
you
want
to
replace
one
string
of
text
with
another, you
must
separate
the
two
with
a CONTROL·Z. You
can
end
the
second
string
by
pressing
the
RETURN key.
If
you
do
not
specify
textl,
the
R
command
assumes
the
old
(the
previous)
value.
If
this is
the
first
replacement
that
you
have
made
during
the
current
editing session,
and
if
you
do
not
specify
textl,
the
command
ends.
If
you
do
not
specify text2,
you
must
end
textl
by
pressing
the
RETURN key.
If
you
omit
the
first line option, edlin uses
the
line after
the
current
line, by default.
The
default for
the
second
line
option
is
#.
Remember
that # refers
to
the
line after
the
last line
of
the
file.
If
you
end
textl
with
a CONTROL·Z
and
do
not
specify text2, edlin
assumes
you
want
blank spaces for text2. For example,
suppose
you
want
to
delete
all
occurrences
of
the
word
clients from
your
file.
To
do
this you
could
simply
type
the
following
command,
then
press
CONTROL·Z
and
RETURN:
rclients
The
next
command
replaces clients
with
the
previous
text2:
rclients
The
following
command
makes
the
previous
textl
become
the
previous
text2:
Edlin Commands
163[
(R)eplace
Deleting al\
occurrences of a
word from a file
Replacing a
string of text
throughout a file

Table of Contents

Related product manuals