Tag Archives: perl

[Perl] Find and replace strings in text file

Just a simple find/replace tutorial. This is applicable to sed too. perl -p -ibak -e "s/find text/replacement text/g" file.txt Where “find text” and “replacement text” are what they are. To replace your find string, just use parentheses: \n (in this case \1) means the group number of the find string you parenthesized (not a word?): [...]

Posted in HowTo, Unix One-Liners | Also tagged , | Leave a comment

If programming languages were religions…

http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html Voodoo Perl

Posted in Tech | Also tagged , | Leave a comment

Batch file hell

Once upon a time (mid-80′s, yes I’m that old) I chanced upon my uncle’s book “Microsoft MS-DOS Command Reference”. I grabbed it and was making up batch files in my head even if I did not have access to a PC back then (C64 user here). Then we got a 486 and Wordstar then Windows [...]

Posted in Tech | Also tagged , , , | Leave a comment

Rename digital photos to creation date

More often than not digital cameras name their photos in succession (eg: IMG001.JPG, IMG002.JPG, etc). If you use your digicam a lot and tend to dump photos in a hurry in some directory, then some of them may get clobbered by new ones if they have the same filename. Some cameras have the ability to [...]

Posted in Unix One-Liners | Also tagged , , | Leave a comment