From owner-freebsd-questions Thu Jul 11 9: 7: 8 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26EC637B400 for ; Thu, 11 Jul 2002 09:07:06 -0700 (PDT) Received: from smtp.isoco.com (terremoto.isoco.net [212.9.90.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31CE543E09 for ; Thu, 11 Jul 2002 09:07:05 -0700 (PDT) (envelope-from fxn@retemail.es) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.isoco.com (Postfix-Nx) with SMTP id BA15527662; Thu, 11 Jul 2002 18:06:59 +0200 (CEST) Received: from smtp.bcn.isoco.net (ldap.isoco.net [172.16.0.11]) by smtp.isoco.com (Postfix-Nx) with ESMTP id B03A127661; Thu, 11 Jul 2002 18:06:59 +0200 (CEST) Received: from fxn (fxn.bcn.isoco.net [172.16.1.50]) by smtp.bcn.isoco.net (Postfix) with SMTP id 793A4CD2B5; Thu, 11 Jul 2002 18:06:56 +0200 (CEST) Date: Thu, 11 Jul 2002 18:07:04 +0200 From: Francesc X.Noria To: Eric Six Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Shell Script Question.. (perl maybe be better?) Message-Id: <20020711180704.79e972fc.fxn@retemail.es> In-Reply-To: References: X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Thu, 11 Jul 2002 09:36:33 -0500 Eric Six wrote: : I have a perl script I am running to collect statisics from a few different : routers.. I want a report on a specific column in the report however.. the : text files look like this : : Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 : Col9 Col10 Col11 : n/n/n n n n text text text n : n n text If each row is in its own line and the wrapping in the original message is due to mail clients, I guess this one-liner filter would help: perl -ne 'print((split /\t/)[-1])' It would be used like this: $ perl -ne 'print((split /\t/)[-1])' just_col11.txt -- fxn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message