Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 2009 16:52:52 -0700 (PDT)
From:      Tom Worster <fsb@thefsb.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Display TSV files with columns aligned
Message-ID:  <26002056.post@talk.nabble.com>
In-Reply-To: <20091020190019.GJ29215@dan.emsphone.com>
References:  <25979622.post@talk.nabble.com> <20091020190019.GJ29215@dan.emsphone.com>

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


Dan Nelson wrote:
> 
> In the last episode (Oct 20), Tom Worster said:
>> is there a cli command that lays out tsv files for display with a fixed
>> width font?
>> 
>> that is, it figures how wide each column needs to be and pads each field
>> in the file with a suitable about of space?
> 
> The "rs" command should do what you want, if you can figure out the
> correct
> commandline options.  It's not easy, though...
> 

thanks dan. i spent a happy while reading the rs man page over and over,
trying every every combination of flag.

afaict, rs wants to make all the columns the same width. that doesn't work
for me. a typical data file i want to review might have 6 columns, 5 of
which are limited width and fairly narrow while the other other varies from
one character to needing a widescreen 27" display.

so the other feature i need is truncation of the rare extra-long values in
that last column.

if i knew perl...
-- 
View this message in context: http://www.nabble.com/Display-TSV-files-with-columns-aligned-tp25979622p26002056.html
Sent from the freebsd-questions mailing list archive at Nabble.com.




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