'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 a
# Remove characters from 2nd to 5th column position $ echo "abcdefghij" | colrm 2 5 afghij
#The following command deletes the characters in column 4-8 from the file file.txt $ colrm 4 8 < file.txt |
阅读(616) | 评论(0) | 转发(0) |