Re: bash command
kuLa (debian@kulisz.net on 2011-10-20 09:37 +0100):
> On 20/10/11 09:29, 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??
>
> Well, I don't know about bash command but I know about sed.
Theoretically it's possible with bash (>=3) as well:
$ VAR=oldword
$ echo $VAR
oldword
$ echo ${VAR/old/new}
newword
And use a read loop over all the lines in the file :)
Regards,
Arno
Reply to: