The use of the echo command for Linux __linux

Source: Internet
Author: User

The echo command of Linux, which is very commonly used in shell programming, is often used when printing variable value under a terminal, so it is necessary to understand the use of the following Echo

The function of the echo command is to display a piece of text on the monitor, which generally acts as a hint.

The general format for this command is: Echo [-n] String

where option n means that the output text does not wrap, and the string can be enclosed in quotes or without quotes. Output a quoted string with the Echo command, outputting the string as it is, and using the echo command to output a string without quotes, each word in the string is output as a string, separated by a space between the strings.

Function Description: Display text.

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

Supplemental Note: Echo will send the input string to standard output. The output string is separated by a white space character and the last line number is added.

Parameters:-n do not wrap at the last line

-E If the following characters appear in the string, it is handled in particular, not as a general

Text output:

\a issued a warning sound;

\b Deletes the previous character;

\c finally does not add line symbol;

\f the line but the cursor still stays in the original position;

\ n Wraps and the cursor moves to the beginning of the line;

\ r The cursor moves to the beginning of the line, but does not wrap;

\ t Insert tab;

\v and \f are the same;

\ \ insert \ character;

\NNN inserts the ASCII character represented by the NNN (octal);

–HELP Display Help

–version Display version Information

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.