Tip #564   Remove columns from text

'colrm' is a column removal filter.

If only one parameter is specified, the characters of each line will be removed starting from that specified column number, if called with two parameters (range of character position to remove) the columns/characters from character position x to character position y will be removed.

Some examples:

# Remove characters from 2nd character position till end
$ echo "abcdefghij" | colrm 2

# Remove characters from 2nd to 5th column position
$ echo "abcdefghij" | colrm 2 5

#The following command deletes the characters in column 4-8 from the file file.txt
$ colrm 4 8 < file.txt