If a column name does not match any of the columns in tableorist, column creates an empty column by that name in that location. If no columns are specified on the command line then tableorlist is passed to the standard output unchanged.
$ cat inventory Item Amount Cost Value Description ---- ------ ---- ----- ----------- 1 3 5.00 0 rubber gloves 2 100 0.50 0 test tubes 3 5 8.00 0 clamps 4 23 1.98 0 plates 5 99 2.45 0 cleaning cloth 6 89 14.75 0 bunsen burners 7 5 175 0 scales$ column Cost Amount Total Description < inventory Cost Amount Total Description ---- ------ ----- ----------- 5.00 3 rubber gloves 0.50 100 test tubes 8.00 5 clamps 1.98 23 plates 2.45 99 cleaning cloth 14.75 89 bunsen burners 175 5 scales
The Cost and Amount columns are reversed, and a new Total column has been added.
column can also be used to project columns from list format files:
$ cat maillist Number 1 Name Ronald McDonald Company McDonald's Street 123 Mac Attack City Memphis State TENN ZIP 30000 Phone (111) 222-3333AKANumber 2 Name Chiquita Banana Company United Brands Street Uno Avenido de la Reforma City San Jose State Costa Rica ZIP 123456789 Phone 1234
$ column Number Name Phone < maillist Number 1 Name Ronald McDonald Phone (111) 222-3333
Number 2 Name Chiquita Banana Phone 1234