colrm

remove columns from text input

TLDR

Remove first column from stdin
$ colrm 1 1
Remove from column 3 to end of each line
$ colrm 3
Remove columns 3 to 5
$ colrm 3 5

SYNOPSIS

colrm [first] [last]

DESCRIPTION

colrm removes selected columns from text read from standard input. Columns are counted from 1. If only one argument is given, columns from that number to the end of line are removed.The tool is useful for text processing pipelines where specific column ranges need to be stripped.

PARAMETERS

first

First column to remove (1-indexed)
last
Last column to remove (optional, defaults to end of line)
-h, --help
Display help text and exit
-V, --version
Print version and exit

INSTALL

sudo apt install bsdextrautils
sudo apk add util-linux-misc

CAVEATS

Column counting starts at 1, not 0. Tabs are treated as advancing to the next multiple of 8 columns. Backspace characters decrement the column count by one. Part of the util-linux package.

SEE ALSO

cut(1), column(1), awk(1), expand(1), paste(1)