-- Original Message --
From: Mark Tinguely
Date: Fri, 13 Aug 2010 11:14:03 -0500
>Len Conrad wrote:
>> I readfile or pipe this text, in any line order:
>>
>> rm90.steampick.info
>> fgce172.lanejive.info
>> smailer1.service.govdelivery.com
>> fl49.orangetal
Len Conrad wrote:
I readfile or pipe this text, in any line order:
rm90.steampick.info
fgce172.lanejive.info
smailer1.service.govdelivery.com
fl49.orangetalon.info
pollux.carespecial.info
into a program to remove subdomains down to domain.tld :
awk 'FS="." { print $(NF-1)"."$NF }'
and get the
mer...@stonehenge.com (Randal L. Schwartz) writes:
> Len> awk 'FS="." { print $(NF-1)"."$NF }'
>
> Len> rm90.steampick.info.rm90.steampick.info
> Len> lanejive.info
> Len> govdelivery.com
> Len> orangetalon.info
> Len> carespecial.info
>
> Yes, that would be the expected behavior.
>
> You need to
-- Original Message --
From: Anonymous
Date: Fri, 13 Aug 2010 20:13:20 +0400
>"Len Conrad" writes:
>
>> awk 'FS="." { print $(NF-1)"."$NF }'
>>
>> rm90.steampick.info.rm90.steampick.info
>> lanejive.info
>> govdelivery.com
>> orangetalon.info
>> carespeci
> "Len" == Len Conrad writes:
Len> I readfile or pipe this text, in any line order:
Len> rm90.steampick.info
Len> fgce172.lanejive.info
Len> smailer1.service.govdelivery.com
Len> fl49.orangetalon.info
Len> pollux.carespecial.info
Len> into a program to remove subdomains down to domain.tld :
"Len Conrad" writes:
> awk 'FS="." { print $(NF-1)"."$NF }'
>
> rm90.steampick.info.rm90.steampick.info
> lanejive.info
> govdelivery.com
> orangetalon.info
> carespecial.info
Hmm, I can't reproduce it on /head. What FreeBSD version you're using?
Can you try with lang/nawk port? nawk is from the
I readfile or pipe this text, in any line order:
rm90.steampick.info
fgce172.lanejive.info
smailer1.service.govdelivery.com
fl49.orangetalon.info
pollux.carespecial.info
into a program to remove subdomains down to domain.tld :
awk 'FS="." { print $(NF-1)"."$NF }'
and get the first line doubled