Replacing a string in a bunch of files using perl inline replace:
perl -pi -e ‘s/ORIG/NEW/g’
September 20th, 2011 | Posted in Linux, Perl | No Comments
Tags: Perl Inline Replace
Replacing a string in a bunch of files using perl inline replace:
perl -pi -e ‘s/ORIG/NEW/g’
December 3rd, 2008 | Posted in Linux, Perl | No Comments
I am using this as a skeleton in various scripts where I need to be notified of errors or successful runs…
#!/usr/bin/perl
open(MAIL,"|/usr/lib/sendmail -t");
print MAIL "To: you\@domain.com\n";
print MAIL "From: name