colrm Command Examples in Linux

The colrm command is a utility in Linux that is used to remove specific columns from a text file. The colrm command reads a text file and removes the specified columns from the file, writing the resulting text to standard output.

To use the colrm command, you will need to specify the starting column number and the number of columns to remove.

To remove the first 3 columns from a text file, use the following command:

# colrm 1 3  output_file.txt

This will remove the first 3 columns from the input file and write the resulting text to the output file.

colrm Command Examples

1. Remove first column of stdin:

# colrm 1 1

2. Remove from 3rd column till the end of each line:

# colrm 3

3. Remove from the 3rd column till the 5th column of each line:

# colrm 3 5
Related Post