Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2002 10:40:39 -0800 (PST)
From:      Ken Bolingbroke <hacker@bolingbroke.com>
To:        Angela Yu <angelaoyu@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: [Unix shell script] 
Message-ID:  <20020205103829.P91586-100000@fremont.bolingbroke.com>
In-Reply-To: <F83XQ3S2vUSW10Yhmvv00006e9c@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 5 Feb 2002, Angela Yu wrote:

> I am interested in knowing the shell script that can remove the subdomain
> part of all FQDN in a input file, have domain name sorted and send the list
> to a new output file.
>
> Example:
> Input File -
> www.hotmail.com
> mail.yahoo.com
> ftp.yahoo.com
> mail.hotmail.com
> www.computer.com.uk
>
> Output File-
> computer.com.uk
> hotmail.com
> hotmail.com
> yahoo.com
> yahoo.com

 cut -d. -f2- < inputfile | sort > outputfile

Ken Bolingbroke
hacker@bolingbroke.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020205103829.P91586-100000>