Shinji Kuwayama

Archive for the ‘Tech Tips’ Category

10 Mar, 2010

Perl one-liner to extract email addresses from a text file

Posted by: Shinji Kuwayama In: Rails| Tech Tips

I occasionally have to search log files for email addresses. Here’s the command I use to extract them all out quickly into another file.
perl -wne’while(/[\w\.\-]+@[\w\.\-]+\w+/g){print “$&\n”}’ original.txt | sort -u > extracted_emails.txt
There’s probably room for improvement here—any ideas, please comment!

28 Jan, 2010

On Writeboards and Basecamp

Posted by: Shinji Kuwayama In: Clients| Projects| Tech Tips

Basecamp makes things easy, and I love it. Here’s an odd example though: Basecamp makes it incredibly easy to post the wrong link to a Writeboard—one which prompts for a mysterious password that no one knows.
I know how to avoid this mistake and in a moment, so will you!
Writeboard and Basecamp are actually separate products, [...]


About

View Shinji Kuwayama's profile on LinkedIn Shinji Kuwayama is a Rails developer in Chicago, Illinois.

Twitter

Posting tweet...