Operating System - HP-UX
1827295 Members
4280 Online
109717 Solutions
New Discussion

Re: column command in HPUX

 
SOLVED
Go to solution
wojtek75
Frequent Advisor

column command in HPUX

Hi,

there is a 'column' command in Linux that is responsible for columnating lists of files,wordc etc. Its manual is available for exampel here:
http://www.linuxmanpages.com/man1/column.1.php

Is there anything similar in HPUX B.11.11?

Thank you in advance.
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: column command in HPUX

Hi:

I think 'paste' is about as close as you get:

# ls | column -c 40

# ls | paste - -

...yet the order of the elements tabulated differs.

Regards!

...JRF...
Srikanth Arunachalam
Trusted Contributor

Re: column command in HPUX

hi,

You could use awk to columnize the output. For example, a simple ls -lrt column can be columized as given below.

$ ls -lrt |awk '{print $8" pause "$9}'|more

07:33 pause BRSW.mdb
07:34 pause BRSW.ldb
12:24 pause STM_BBROL_sum.xls
05:29 pause core.26265
20:38 pause 20071112_STM_BRTRS_trade.txt
20:38 pause 20071112_STM_BRTRS_sum.txt
20:50 pause 20071112_STM_BRTRI_sum.txt
20:50 pause 20071112_STM_BRTRI_trade.txt
21:46 pause 20071112_STM_BBROL_DELTA_sum.txt
21:48 pause 20071112_STM_BBROL_DELTA_trade.txt
22:35 pause 20071112_STM_BBROL_sum.txt
22:39 pause 20071112_STM_BBROL_trade.txt
01:30 pause 20071112_STM_BBROL_DELTA_sumrev.txt
01:30 pause 20071112_STM_BBROL_sumrev.txt
02:09 pause 20071112_STM_BRMOP_trade.txt
02:09 pause 20071112_STM_BRMOP_sum.txt
05:07 pause 20071112_STM_BRMOP_Vega_sum.txt
05:07 pause 20071112_STM_BRMOP_Vega_trade.txt

Thanks,
Srikanth
Systems_Guy
Occasional Visitor

Re: column command in HPUX

pr -t -c #

e.g.:    ls | pr -t -c 2

 .. for a two-column file listing