[olug] First Ruby on Rails user group meeting 08/20/2008 (and regex question)

Adam Haeder adamh at aiminstitute.org
Mon Aug 18 14:18:58 UTC 2008


The inagural Ruby on Rails user group will meet at the AIM Institute 
training lab (same place OLUG meets) this Wednesday, 08/20/2008, starting 
at 7pm.

More information here: http://www.omaharails.org/

Please pass this on to others that might be interested.

Obligatory linux question:
I'm attempting to write a shell script that will pull email addresses out 
of a file. These addresses may appear anywhere in a line. I think what I'm 
essentially looking for is a 'substring grep'. I want a grep that will 
give me part of a line that matches a regex. I've been toying with the 
idea of doing something like this:

cat $file | tr ' ' '\n' | egrep $EMAIL_REGEX

This would replace all the spaces in the file with newlines, and then I 
can grep each newline for an email (since you can't have spaces in 
emails).

This seems a little heavy-handed though. Anyone else solved this problem 
more elegantly?

--
Adam Haeder
Vice President of Information Technology
AIM Institute
1905 Harney Street, Suite 700
Omaha, NE 68102
402-345-5025 x115
adamh at aiminstitute.org
www.aiminstitute.org



More information about the OLUG mailing list