'^' indicates the beginning of a line,
'$' indicates the end
will
s/^$name$/#$name/
do what you want?
- Roger -
- Original Message -
From: "Jose Vicente" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 29, 2001 1:26 A
- Original Message -
From: "Jose Vicente" <[EMAIL PROTECTED]>
> Hi friends.
> I am replacing a string using s///, in the following way:, but I only
> need and exact string to be replaced, for example if I have a file with
the
> following strins:
> amor
> alto
> a
> bacho
> And execute
, 2001 9:26 AM
Subject: I need your help
> Hi friends.
> I am replacing a string using s///, in the following way:, but I only
> need and exact string to be replaced, for example if I have a file with
the
> following strins:
> amor
> alto
> a
> bacho
> And execute
&
day, December 28, 2001 7:27 PM
To: [EMAIL PROTECTED]
Subject: I need your help
Hi friends.
I am replacing a string using s///, in the following way:, but I only
need and exact string to be replaced, for example if I have a file with the
following strins:
amor
alto
a
bacho
And execute
~s/$name
Hi friends.
I am replacing a string using s///, in the following way:, but I only
need and exact string to be replaced, for example if I have a file with the
following strins:
amor
alto
a
bacho
And execute
~s/$name/#$name/g
where $name is equal to "a", so I have
#amor
#alto
#a
b#acho
But I
lete the word from the second problem, just remove the REPLACEMENT_WORD
completely (replace with nothing).
Shawn
- Original Message -
From: "Jose Vicente" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 20, 2001 10:30 AM
Subject: I need your help
PROTECTED]]
Sent: 20 December 2001 16:31
To: [EMAIL PROTECTED]
Subject: I need your help
Hi.
I am trying two items in a script:
- I have to read a file and when I find certain word I must change it for
other one.
- I have to read a file and when I find certain word I must delete it from
the file
Hi.
I am trying two items in a script:
- I have to read a file and when I find certain word I must change it for
other one.
- I have to read a file and when I find certain word I must delete it from
the file and all the ocurrences.
Thanks for your help.
--
To unsubscribe, e-mail: [EMAIL