[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SLUG] Re: search and replace
On 28 Jun 2000, Herbert Xu wrote:
>
> Peter Samuel <Peter.Samuel@nospam.ind.tansu.com.au> wrote:
>
> > In vi
>
> > :g/\.org\>/s//.com/g
>
> \> is a very cool GNU extension, but it isn't what we want in this case as
> it'll match a hypothetical www.org-non.com.
Picky, picky picky :)
I don't think the \> is GNU. It works with vi and grep under Solaris
and they are AT&T derived rather than GNU.
Given that the files are DNS, the .org should be followed by a dot to
indicate the end of the TLD or separate the .org from the TLD, try
this
:g/\.org\./.com./g
Regards
Peter
----------
Peter Samuel peter@nospam.eserv.com.au
Technical Consultant or at present:
eServ. Pty Ltd Peter.Samuel@nospam.ind.tansu.com.au
Phone: +61 2 9206 3410 Fax: +61 2 9281 1301
"If you kill all your unhappy customers, you'll only have happy ones left"
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text