Re: Format Output of bash into columns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux