Quantcast
Channel: Brakertech » perl
Browsing latest articles
Browse All 4 View Live

replace text in a file with perl

replace text in a file with perlhere’s how to replace text in a file with perl: perl -pi -e 's~OLDTEXT~NEWTEXT~g' /path/to/filename Brakertech - tech problems: solved

View Article



perl replace text in multiple files

perl replace text in multiple filesperl replace text in multiple files perl -pi -e 's~OLDTEXT~NEWTEXT~g' /path/to/filenames/* Alternative (to avoid escaping slashes): perl -pi -e 's|w/|with|g'...

View Article

linux unwrap text file

linux unwrap text fileI spent forever trying to figure out how to unwrap an apache access_log that was splitting requests between two lines. I finally found the answer! Create a perl script called...

View Article

passing bash variable to perl command in bash script

passing bash variable to perl command in bash scriptRecently I tried passing a bash variable to perl command in bash script, it didn’t end well. Troy Engel from http://tacticalvim.wordpress.com/ was...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images