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

Re: bash command



On Thu, Oct 20, 2011 at 09:29:35AM BST, Jesus arteche wrote:
> I want to create  a script to change some words in some sonf files at the
> start up of the system...do you know the command in bash for search the word
> and replace it??

You don't need bash for it, sed's your friend, e.g.:

% sed -i 's/old_word/new_word/' /etc/conf.file

I highly recommend.

% man sed

Regards,
-- 
Raf


Reply to: