//Tips tagged colrm
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
'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

View Comments »

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit