[aclug-L] Re: dumb sed problem
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
in perl you can do /\babc\b/ijk/
where \b means match at a word boundry.
I'm not sure how to do something similar in sed
On Wed, 2001-11-21 at 13:30, Maverick wrote:
>
> Hi, all
> I have a file
> #myfile
> abc abcde abc abcdefg abc abcde
> abc abc abcdef abce
>
> I want to use sed to replace the exact word "abc" to
> "ijk",
> sed 's/abc/ijk/g' myfile
>
> it replace all to the ijk, but I only want abc
> like
> #myfile
> ijk abcde ijk abcdefg ijk abcde
> ijk ijk abcdef abce
>
> Thanks.
>
> Mav
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1
> -- This is the discussion@xxxxxxxxx list. To unsubscribe,
> visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
--
Clint Brubakken <cabrubak@xxxxxxxxxx>
Programmer Analyst
Inetic Web Development
---
Black holes are where God divided by zero.
-- This is the discussion@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
|
|