At 02:42 PM 6/19/2003 -0500, you wrote:
>Don't know if it's cleaner or not - but this handles as many subdomains as
>you throw at it.
>
>awk -F. '{dom="";for(i=NF;i>0;i=i-1){dom = dom "." $i;};print dom;}'
>test.sort | sort | awk -F. '{dom="";for(i=NF;i>0;i=i-1){dom = dom "."
>$i;};print substr(dom,2,length(dom)-2);}'
>
>All one line of course.
>
>Produces this:
>1.a.com
>5.a.com
I think we have a winner then.
--- Dustin Puryear <dustin@puryear-it.com> Puryear Information Technology Windows, UNIX, and IT Consulting http://www.puryear-it.com ___________________ Nolug mailing list nolug@nolug.orgReceived on 06/19/03
This archive was generated by hypermail 2.2.0 : 12/19/08 EST