Name

colrm

Synopsis

colrm [start [stop]]

Removes specified columns from a file, where a column is a single character in a line. Reads from standard input, and writes to standard output. Columns are numbered starting with 1; begin deleting columns at (including) the start column, and stop at (including) the stop column. Entering a tab increments the column count to the next multiple of either the start or stop column; entering a backspace decrements it by 1.

Example

List all the contents of a directory and remove the permissions, UID and GID, file size, and the date/time information, leaving just the filenames:

$ ls -la | colrm 1 50

Get Mac OS X Tiger in a Nutshell 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.