天天看点

column - 命令详解

column命令用于格式化列信息。

column命令的使用格式如下:

column [-tx] [-c columns] [-s sep] [file ...]

常用的选项

-c      Output is formatted for a display columns wide.

-s      Specify a set of characters to be used to delimit columns for the -t option.

-t      Determine the number of columns the input contains and create a table.  Columns are delimited with whitespace, by 

        default, or with the characters supplied using the -s option.  Useful for pretty-printing displays.

-x      Fill columns before filling rows.

样例

$ mount | column -t

/dev/root on / type ext3 (rw)

/proc on /proc type proc (rw)

/dev/mapper/lvmraid-home on /home type ext3 (rw,noatime)

column -t  列对齐