Date: Thu, 11 Jul 2002 18:07:04 +0200 From: Francesc X.Noria <fxn@retemail.es> To: Eric Six <erics@sirsi.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Shell Script Question.. (perl maybe be better?) Message-ID: <20020711180704.79e972fc.fxn@retemail.es> In-Reply-To: <DC32C8CEB3F8D311B6B5009027DE5AD5046FA8FA@stlmail.dra.com> References: <DC32C8CEB3F8D311B6B5009027DE5AD5046FA8FA@stlmail.dra.com>
index | next in thread | previous in thread | raw e-mail
On Thu, 11 Jul 2002 09:36:33 -0500
Eric Six <erics@sirsi.com> 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])' <all_cols.txt >just_col11.txt
-- fxn
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020711180704.79e972fc.fxn>
