complex search and replaces (was Re: [OS X TeX] Support for AppleScript please)

Alan Curtis acurtis at
Mon Dec 6 13:32:17 EST 2004

On Dec 6, 2004, at 1:01 PM, William F. Adams wrote:

> Maybe it's heretical, but I've been using a Windows tool 
> ``bkreplacem'' for this sort of thing of late.
> Is there anything like to it (free!?!) for Mac OS X?

You could try a perl one-liner in a Terminal window. For example

perl -p -e 's/original/replacement/g' *.tex

would replace all occurrences of 'original' with 'replacement' in all 
the files *.tex. The find and replace strings can be regular 
expressions and so this can be very powerful.


--------------------- Info ---------------------
Mac-TeX Website:
           & FAQ:
List Post: <mailto:MacOSX-TeX at>

More information about the MacOSX-TeX mailing list