replace text in a file with perl

here’s how to replace text in a file with perl:

perl -pi -e 's~OLDTEXT~NEWTEXT~g' /path/to/filename

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>