Echo-e "ABC \ ndef"
Output:
ABC
Def
-E: Enable interpreted backslash escape.
Default Value:-E. Escape is disabled.
Echo itself outputs a line feed by default. to disable the last line feed, you can use
Echo-n "ABC"
-N do not output the trailing newline
The echo syntax is as follows:
The Linux echo command cannot display the content in the file.
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 tab;
\ V is the same as \ F;
\ Insert \ characters;
\ NNN inserts the ASCII characters represented by NNN (octal;