LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

colrm

remove columns from text input

TLDR

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

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
copy
sudo apk add util-linux-misc
copy

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)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid