[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SLUG] search and replace



Michael Lake wrote:
> 
> Dean Hamstead wrote:
> > Is there a command in vi or somesuch standard cli editor to search and
> > replace
> > in my case change all ".org" entries to ".com" in the dns files
> > im sure awk or seomthing can do it also....
> 
> cat your_dns_file | sed 's/\.org/\.com/' > new_dns_file
> 
> The \. escapes the dot and the dot is there so that names
> like www.organ_society.org don't end up as
> www.coman_society.com

Um... this example will still get screwed up. The 'org' bit in
www.organ_socitety.org has a dot before it!

Better to try Herbert's suggestion...
--
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