Author:
erics, July 8th, 2020
|
my $stamp = strftime "%Y%m%d%H%M%S", gmtime time; ## in-place update for the file our $^I = ".$stamp"; local @ARGV = ($fullpath); while ( <ARGV> ) { if (/$regex/) { next; } # this print is the critical part to write the line back to the file print; } $^I = undef; |
Categories: How-To's, Technology Tags: Change, Edit, Edit In Place, howto, in place, Inline, modify, perl, Place, Script, tips
|
No comments
Author:
erics, May 11th, 2020
|
add_filter( 'user_meta_admin_email_recipient', 'changeAdminEmails' ); function changeAdminEmails( $emails ) { return array( 'youremailtarget1@yourdomain.com', 'youremailtarget2@yourdomain.com' ); } |
Categories: How-To's, Technology Tags: admin, Admin Email, Change, Destination, Edit, Email, howto, meta, modify, Notification, Pro, Target, tips, User, user-meta, user-meta-pro, WordPress, WP, WP User Meta
|
No comments
Author:
erics, March 23rd, 2020
Using PERL, we can easily do a search and replace across multiple files. perl -ni -w -e ‘print unless m/^gdb\d+/;’ yourFileSpec
Categories: How-To's, Technology Tags: Batch, Delete, Edit, Edit In Place, howto, in place, perl, search, tips
|
No comments