Linux colrm command details how to use Linux colrm command

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.