O'Reilly logo

Linux® Desk Reference, Second Edition by Scott Hawkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required