Complete.Org: Mailing Lists: Archives: discussion: November 2001:
[aclug-L] Re: dumb sed problem
Home

[aclug-L] Re: dumb sed problem

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: discussion@xxxxxxxxx
Subject: [aclug-L] Re: dumb sed problem
From: Clint Brubakken <cabrubak@xxxxxxxxxx>
Date: 21 Nov 2001 14:38:32 -0600
Reply-to: discussion@xxxxxxxxx

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


[Prev in Thread] Current Thread [Next in Thread]