From owner-freebsd-questions Sun Feb 3 19:38:23 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 76FCD37B478 for ; Sun, 3 Feb 2002 19:37:52 -0800 (PST) Received: from hades.hell.gr (patr530-a238.otenet.gr [212.205.215.238]) by mailsrv.otenet.gr (8.12.2/8.12.2) with ESMTP id g143bhLA000970; Mon, 4 Feb 2002 05:37:44 +0200 (EET) Received: (from charon@localhost) by hades.hell.gr (8.11.6/8.11.6) id g143bge03650; Mon, 4 Feb 2002 05:37:42 +0200 (EET) (envelope-from keramida@freebsd.org) Date: Mon, 4 Feb 2002 05:37:38 +0200 From: Giorgos Keramidas To: Angela O Yu Cc: freebsd-questions@freebsd.org Subject: Re: question about command 'cut' Message-ID: <20020204033738.GA3346@hades.hell.gr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-02-03 21:57, Angela O Yu wrote: > Hello > > I have a problem with cut > > I would like to get output > > hotmail.com from www.hotmail.com > > However, this command output > > cut -d "." -f1 filename --> hotmail > > How can I get output hotmail.com You want fields 2 up to (and including) the last one. Try this: % echo www.hotmail.com | cut -d. -f2- hotmail.com -- Giorgos Keramidas . . . . . . . . . keramida@{ceid.upatras.gr,freebsd.org} FreeBSD Documentation Project . . . http://www.freebsd.org/docproj/ FreeBSD: The power to serve . . . . http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message