[PLUG] Okay after awk I need....

Ronald Chmara ron at Opus1.COM
Sat May 7 03:00:06 UTC 2005


On May 6, 2005, at 7:10 PM, techmage wrote:
> Michael Rasmussen wrote:
>> techmage wrote:
>>> I'm taking a line separated list of Usernames and domain names and 
>>> removing the usernames(don't need them)
>> Assuming that the list looks like:
>> username	tire.patch.com
>> uname2	berry.patch.com
>> userthree	patch.com
> More like:
> twilan_burger_zn at 007box.de
> kzpipfj at 007mundo.com
> angelique_headnj at 0711veranstaltungstechnik.de
> horaciojallison_mh at 0a0.de
> maryconner_bg at 1-msv.de
> jamison_xx at 1-seeit.com
> 1zbyinj8eiwz4fgpmnoxjbvceqpqpp at 102908.reply.avantflare.com
> 1zbyuxtios69epqzwxyhtl5mo0y7b1 at 103158.reply.morninginbox.com
> 1zbyttpeko25almvstudph1ikwu2b0 at 103209.reply.herecomesthebank.com
> 1zbym9vu04ilq12b89aj5xho0cag9b at 103466.reply.1leto.com
.....
> Well this and the script sort of worked. They woked in that they did 
> something, but not the expected outcome.
> See, I can get rid of the usernames, but the subdomains, I need to 
> save the actual domains, but can dump the subdomains and that has been 
> the tricky part. I tried to get it to dump the first field after using 
> a period as the field delimitor, but I still wound up losing domains, 
> and since I don't know eactly how many fields each line will have, I'm 
> not sure how to get it to just pull the last two, since this 
> "normally" is were the actual doamain and extension should be.

Are you sure about doing that? For "user at amazon.co.uk" you just want 
".co.uk", and for "fred at corbett.tusd.k12.us" you just want "k12.us"?

Herin lies the problem. the "actual domain" rules (if I understand your 
usage properly) vary wildly, so it's hard to determine what is, and 
isn't,

Is it possible to take a step back from the problem, and define what 
the desired *outcome* is? Do you need to find the MX records for those 
email addresses, or something similar?

-Bop




More information about the PLUG mailing list