November 2007
2 posts
'Replace all' droplet using Platypus
Using Platypus (http://sveinbjorn.org/platypus), a development tool for Mac OS X, all sorts of shell or other scripts can be converted into proper applications. The Perl script to do a ‘Replace all’ presented in a previous post has to be modified somewhat to handle the handover of arguments and file paths. The code below has to be saved as a .pl file. In Platypus the path of the...
Batch 'Replace all' Perl script
Copy the text below into a text file and save with the extension .pl. It expects the replacement text to start with ‘' (ie, a backslash). #! /usr/bin/perl # Does a ‘Replace All’ on file1, using the list of changes supplied in file2 # Usage: replacetext.pl file1 file2 # If no arguments are supplied the two hard-coded files (file-to-be-modified.txt and list-of-changes.txt)...