Linux Rocks ! wrote:

> So, Id like to extract just the one liner portion of email sent from joker.org
> (ie, I want all the one-liners from all the memail joke of the day messages I 
> have, and a "%" to separate each oneliner, and Id like them put in a text 
> file,  then I can make a fortune database with it, and use it with fortune.)
> 
> What would be the best way to do this?

    sed -n '/The Famous.*One Liner/,/^From /p' | \
        sed -e '/The Famous.*One Liner/d' -e 's/^From .*/%/'

Not quite what you want -- it leaves a blank line at the top of each
fortune.

-- 
Bob Miller                              K<bob>
kbobsoft software consulting
http://kbobsoft.com                     [EMAIL PROTECTED]
_______________________________________________
Eug-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug

Reply via email to