Linux echo commands are very common in shell programming and are often used to print the variable value in 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; Use the echo command to output a string without quotation marks
Each word in a string is output as a string, and each character 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 sends an alert;
/B. Delete the previous character;
/C does not end with a line break;
/F line feed, but the cursor remains at the original position;
/N wrap and move the cursor to the beginning of the line;
/R move the cursor to the beginning of the line without line breaks;
/T Insert the tab;
/V is the same as/F;
// Insert/character;
/NNN inserts the ASCII characters represented by NNN (octal;
-Help: Display help
-Version: displays version information.