[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Format Output of bash into columns
- From: Michael Schwendt <fedora wir-sind-cool org>
- To: General Red Hat Linux discussion list <redhat-list redhat com>
- Subject: Re: Format Output of bash into columns
- Date: Sat, 27 Nov 2004 16:00:35 +0100
On Fri, 26 Nov 2004 17:37:42 -0600, Mike Vanecek wrote:
> I have looked through my books and googled ... Tried serveral things without
> success ...
>
> I would like to run the output of a bash command that produces 1 field per
> line output through sort and then output in 3 columns. I have looked at
> printf, fmt, column, and so on.
>
> For example,
>
> rpm -qa | sort 2>&1 | column -c 2
>
> rpm -qa | sort | column -c 2
Option -c sets the screen width, i.e. the number of horizontal
characters, where one character = one column. So, you don't want
"-c 2", but something way bigger than 2, so two RPM package names
always fit onto the screen horizontally.
--
Fedora Core release 3 (Heidelberg) - Linux 2.6.9-1.681_FC3
loadavg: 1.23 1.19 1.07
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]