Linux echo command details

Source: Internet
Author: User
The echo command is very common in shell programming and is often used to print the variable value under the terminal, therefore, it is necessary to understand the echo usage. The echo command function is to display a piece of text on the display, which generally serves as a prompt. The command is generally in the format of echo [-n] string echo commands, which are very common in shell programming and often used to print variable values on the terminal, therefore, it is necessary to understand the echo usage.

The echo command is used to display a piece of text on the monitor, which generally serves as a prompt.

The general format of this command is echo [-n] string.

Option n indicates that the output text is not followed by a line break. strings can be enclosed by quotation marks or without quotation marks. When you use the echo command to output a string with quotation marks, the string is output as is. when you use the echo command to output a string without quotation marks, each word in the string is output as a string, each string is separated by a space.

Function description: displays text.

Syntax: echo [-ne] [string] or echo [-- help] [-- version]

Note: echo sends the input string to the standard output. The output strings are separated by blank characters, and the line number is added at the end.

Parameter number:-n. do not wrap the line at the end.

-E if the following characters appear in the string, it will be specially processed and will not be treated as a general

Text output:

A. send a warning;

Delete the previous character;

C does not end with line breaks;

F line feed, but the cursor remains at the original position;

Wrap the line and move the cursor to the beginning of the line;

Move the cursor to the beginning of the line without line breaks;

Insert a tab;

V is the same as f;

\ Insert characters;

Nn inserts the ASCII characters represented by nnn (octal;

? Help show help

? Version: displays version information.

Related Article

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.