[PLUG] Re: Okay after (I changed the subject line cause I needed to.

techmage techmage at aracnet.com
Sun May 8 00:57:25 UTC 2005


Paul Heinlein wrote:

>
> C'mon, make it a one-liner. :-)
>
> (while read addr; do \
>    echo "$addr" |  grep -o '[^.@]*\.[^.]*$'; \
>  done < domain.txt) | \
> sort -fidu | uniq | less
>
> Subshells rock!
>
> -- Paul Heinlein <heinlein at madboa.com>

Okay, Paul is the winner, he outlasted the others. However, as is proper 
in the Open Source community, I insist the wealth be spread around. I'm 
available Tuesday Night at either the Horse Brass or the Moon and Six 
Pence to repay my debt, let me know which is preferable.  I will send my 
recipe to any who ask for it (not HOT---Mild to spicy, I go for flavor 
not for heat, since my old worn out body can't take those fifty yard 
dashes down the trail to the box in the middle of the night) .
I'm trying a new Chili Verde recipe this week , But I have a dang good 
one for Red Chili and a good rub recipe for the BBQ men out there. This 
is competition style chili, not the stuff your elderly Aunt made in Boston.
And if anyone thinks they can stand the heat, I still have a few 
Habeneros in a jar of vinegar. The Vinegar is ALL I use from it.

BTW Paul,

My code came out looking :

++++++++++++++++++++++++++++

while read addr
do
   echo "$addr" | grep -o '[^.@]*\.[^.]*$'
done < domain.txt >> dom.txt
sort -fidu dom.txt >> dom2.txt
uniq  dom2.txt
sort -fidu dom2.txt
rm dom.txt
mv dom2.txt Newdomain.txt
less Newdomain.txt

++++++++++++++++++++++++++++

I'm still not sure it's grabbing all the domains, but it's pretty close.
It pulls an almost Identical set as yours did.

Thanks Everyone for the Help.
One day I hope to be able to do this nearly as well as you do.

thanks,

Harry





More information about the PLUG mailing list