The colrm command reads the secretary from the standard input device and then outputs it to the standard output device. If no parameter is added, this command does not filter any row.
Syntax
Colrm [start row number <end row number>] </p>
<P> <B> parameter description: </B> </p>
<Ul>
<Li> Number of the start row: The start number of the column to be deleted. </Li>
<Li> end row number: end number of the column to be deleted. This parameter can be omitted sometimes. </Li>
</Ul>
<H3> instance
<P> This command does not delete any columns without any parameters: </p>
<Pre>
Colrm
After you press the Enter key, the cursor will flash in the first line. Wait for the standard input. Enter a character, such as "Hello Linux! ", Press enter, and the second line will show the same content as the first line. Press Ctrl + C to exit. The content displayed on the terminal is as follows:
Cmd @ hdd-desktop :~ $ Colrm
Hello Linux! # Input Hello Linux! String
Hello Linux! # Output the input string Hello Linux!
If you want to delete all content after the 4th column, run the following command:
Colrm 4
Similar to the preceding example, the standard input is waiting for input. After the user inputs a string and presses the enter key, the following results are output:
Cmd @ hdd-desktop :~ $ Colrm 4
Hello Linux! # Input Hello Linux! String
El # output the string that deletes all content after 4th columns
Deletes the content of a specified column. For example, to delete content from columns 4th to columns 6th, run the following command:
Colrm 4 6
The output result is as follows:
Cmd @ hdd-desktop :~ $ Colrm 4 6
Hello Linux! # Input Hello Linux! String
HelLinux! # The output deletes the string from column 4th to column 6th characters.