Linux Comm Colrm
# Linux colrm Command
[ Linux Command Manual](#)
The Linux colrm command is used to filter out specified columns.
The colrm command reads data from the standard input device and outputs it to the standard output device. If no parameters are added, the command does not filter any columns.
### Syntax
colrm
**Parameter Description:**
* start_column_number: Specifies the starting number of the column to be deleted.
* end_column_number: Specifies the ending number of the column to be deleted. Sometimes this parameter can be omitted.
### Examples
When used without any parameters, the command does not delete any columns:
colrm
After pressing Enter, the cursor will blink on the first line, waiting for standard input. At this point, enter characters, such as "Hello Linux!", then press Enter. The second line will display the same content as the first line. Press Ctrl+C to exit. The content displayed in the terminal is as follows:
cmd@hdd-desktop:~$ colrm Hello Linux! #Enter the string "Hello Linux!" Hello Linux! #Output the entered string "Hello Linux!"
To delete all content after the 4th column, you can use the following command:
colrm 4
Similar to the previous example, standard input now waits for input. After the user enters a string and presses Enter, the following result will be output:
cmd@hdd-desktop:~$ colrm 4 Hello Linux! #Enter the string "Hello Linux!" Hel #Output the string with all content after the 4th column deleted
To delete content in specified columns. For example, to delete content from the 4th to the 6th column, you can use the following command:
colrm 4 6
The output result is as follows:
cmd@hdd-desktop:~$ colrm 4 6 Hello Linux! #Enter the string "Hello Linux!" HelLinux! #Output the string with characters from the 4th to the 6th column deleted
[ Linux Command Manual](#)
YouTip