How To Delete Lines Using PERL Edit In Place

Author: , 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

How To Batch Search and Replace Multiple Files Using PERL

Author: , October 16th, 2014

Using PERL, we can easily do a search and replace across multiple files. perl -pi -w -e ‘s/SEARCH_FOR/REPLACE_WITH/g;’ FILE_LIST The following example will replace all occurrences of “hello” with “goodbye” inside files ending with .txt:

To handle special characters, use the hex value. For example, to convert MS web files that use control characters: […]

How To Batch Create Thumbnails Using mogrify

Author: , August 7th, 2013

I used the ImageMagick mogrify command to batch-create over 14,000 thumbnails easily. Since the default operation is to overwrite the originals, I chose to write the output files into a different directory with the -path option. Note the greater-than sign (>) after the 100×100 dimensions. This flag tells mogrify to only shrink images that have […]

How To Batch Convert MS Word doc to docx

Author: , June 28th, 2013

Many thanks to Robert Russell for his excellent conversion tip! I have recorded the procedure below in case that post ever goes away… Download the two required installation packages from Microsoft: Microsoft Office Migration Planning Manager Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint File Formats Install both packages. Specify a place to install […]

How To Rename A MySQL Database

Author: , December 3rd, 2011

YMMV…