[Trenches tip] The most handiest Perl one liner I teach

One of my favourite little tricks to teach.  Comes in especially handy when you want to do huge changes on database dumps.

perl -i -p -e “s/text_to_change/text_to_change_to/g;” filename.txt


For the days when your text editor can’t open a 50mb file.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: