Tags

,

I was first shown this in 1997 when I was a “html author” at the Press Association.  As most text editors are pretty naff and can’t open large files what do you do when you’ve got a 50Mb MySQL dump and every domain needs changing from test.domain.com to www.domain.com?You use Perl…. (perhaps I’m too old school or something but not many people seem to know about this nugget anymore)

perl -i -p -e "s/test.domain.com/www.domain.com/g;" mybigmysqldump.sql
Advertisements