Echo (1) user commands echo (1)
Name
Echo-display a line of text
Synopsis
Echo [Option]... [String]...
Description
Echo the string (s) to standard output (standard output: Display ).
-N do not output the trailing (later) newline
-E enable interpretation (explanation) of backslash (backslash) escapes
# Allow explanations of characters escape by backslash.
-E disable interpretation of backslash escapes (default)
# By default, characters escape by backslash are not interpreted.
-- Help display this help and exit
-- Version
Output version information and exit
If-E is in effect, the following sequences are recognized (recognized ):
\ 0nnn the character whose ASCII code is NNN (octal)
\ Backslash
\ A alert (BEL)
\ B backspace
\ C suppress trailing newline # forbid trailing line breaks
\ F form feed # page feed
\ N New Line
\ R carriage return
\ T horizontal (horizontal) tab
\ V vertical (vertical) tab
Note: Your shell may have its own version of ECHO, which usually super-
Sedes the version described here. Please refer to your shell's docu-
Mentation for details about the options it supports.
Echo 5.97 February 2010 echo (1)
Practical drills:
[[Email protected] ~] $ Echo "123456789"
123456789
[[Email protected] ~] $ Echo "123 \ t456 \ v789"
123 \ t456 \ v789 # by default, characters escape by backslash are not interpreted.
[[Email protected] ~] $ Echo-e "123 \ t456 \ v789"
123 456
789
# Observe the differences between carriage return (\ r) and line feed (\ n)
[[Email protected] ~] $ Echo-e "123 \ n456 \ r789"
123
789
[[Email protected] ~] $ Echo-e "123 \ n 456 \ r789"
123
7896
[[Email protected] ~] $ Echo-e "123 \ n 456 \ r789"
123
789456
This article is from the "Cooper blog" blog, please be sure to keep this source http://444546012.blog.51cto.com/8578922/1549151
Echo (1)