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

Re: bash command



Darac Marjal <mailinglist@darac.org.uk> writes:

> Sadly, this can't be done in-place, so you'll either need to use mv to
> replace /etc/conf.file with /etc/conf.file.new or repeat the loop (with
> no substitution) to copy /etc/conf.file.new into /etc/conf.file.

Maybe now with bash, but with perl it can be done in place quite
handily.

 perl -i -pe 's/WORDS/REPLACEMENT/' my.conf


Reply to: