TOOL » LINUX » PACKAGE

Column

Usage

Columnate lists.

shell
column OPTIONS FILE
OptionDescription
-tDetermine the number of columns the input contains and create a table.
-sSpecify the possible input item delimiters (default is whitespace).

Nice for getting the output of paste and pretty-print it.

Example

Get a list of sensors (filename, label and value):

fish
paste (ls -1 /sys/class/hwmon/hwmon*/*_input | psub) (cat /sys/class/hwmon/hwmon*/*_label | psub) (cat /sys/class/hwmon/hwmon*/*_input | psub) \
  | column -ts \t