Commands

colrm

[startcol [endcol]]

Removes the specified columns from a file. This command reads from standard input. Startcol must be specified. If no endcol is specified, colrm will remove all columns up to the end of the line. Otherwise, colrm will remove all the columns from startcol to endcol.

Example: To remove the first three characters from each line in a testfile, use

cat testfile | colrm 1 3

column

[-tx] [-c columns] [-s sep] [input_file …]

This program formats the input data into multiple columns. Typically, you will be formatting a file; however, if no file is specified, column will read from standard input.

Example: To create a table from a text file delimited by “|”s, use

column -t -s \| datafile.txt > table.txt

This command is ...

Get Linux® Desk Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.