perl -i.old -pe 's|^(be_address =).*|$1 192.186.106.55|' svs.conf
In case this goes wrong, the previous version of the file is kept as svs.conf.old (that's the -i.old) - so no risk in trying.
In reply to Re: how to search and replace some text in a .conf file
by morgon
in thread how to search and replace some text in a .conf file
by koti688
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |