Shinji Kuwayama

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, much as Highrise and Campfire are separate. Basecamp provides Writeboard integration, and most people I know just think of it as a Basecamp feature (which is fine).

Writeboard_ Chapter One_ A Project is Born.jpg

See, this is actually a Writeboard URL, and we’re not in Basecamp right now.

If you copy-and-paste the URL from the Location: field, you’re actually capturing a link to your Writeboard account, and not your Basecamp project. That’s why 37signals provides the “Share this Writeboard” link. If you want to link to this document Basecamp-wise, you must right-click the “Share this Writeboard” link, and select “Copy this link” (on a Mac, that is). You do not want to copy the 123.writeboard.com URL.

This is oddly inscrutable for a 37signals product and I hope it gets improved someday. In the meantime, we’ll just have to suck it up and make ourselves remember to link to Writeboards the right way and not the wrong way.

About

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

Twitter

Posting tweet...