Editing File Tips

To change <text> in a list of files

perl -pi -e 's/<text>/<replacement text>/g' files*.txt

For example
perl -pi -e 's/system\.sysLocation\.0\ \=\ \"India\"/system\.sysLocation\.0\ \=\ \"Kerala\"/g' snmp.walk


Comments

Popular posts from this blog

vmWare - Vcenter Server Appliance 5.5 - embedded DB problem

Installing Pytest on Windows Platform

X Forwarding with Putty on Windows