bash command
Michael DeBruyn
mdebruyn at flipkey.com
Thu Oct 20 13:20:01 UTC 2011
On 10/20/2011 04:29 AM, Jesus arteche wrote:
> Hey guys,
>
> 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??
>
> Thanks
>
>
You will want to use something like sed. An example:
sed -i "s/oldword/newword/g" /some/script.sh
This will replace all instances of oldword with newword in the file
script.sh
If you want to do this at system boot you can put it in /etc/rc.local
-Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20111020/497c98b4/attachment.html>
More information about the ubuntu-server
mailing list