Linux of the Echo Command , in the Shell extremely popular in programming , Print variables under the terminal value is often used. , Echo command in the build Shell play an important role in scripting
1. command Format
Echo[options] [String]
2. Command function
List all subdirectories and files in the destination directory
3. Command Parameters
- N do not wrap at the end of the line
The--HELP displays help information on the standard output.
the--version outputs the version information on the standard output and exits.
-e If the following characters appear in the string, they are handled in particular, not as a general
Text output:
\a issued a warning sound;
\b Delete the previous character;
\c finally not add the line break symbol;
\f the line but the cursor remains in its 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 is the same as \f ;
\ \ Insert \ character;
\NNN inserts the ASCII characterrepresented by the NNN (octal) ;
4. Command Instances
Example 1: Entering a line of text and displaying it on standard output
[Email protected] data]# echo I am boy
I am boy
Example 2: Writing a string directly to a file
[email protected] data]# cat Ttt.txt
Asdfasdfasdfasdf
Asfasdfasdfasdfasdf
Dddddddddddddddddddddddd
[[email protected] data]# echo ' Hello word ' >ttt.txt
[email protected] data]# cat Ttt.txt
Hello Word
Example 3:echo-n non-newline output
[[email protected] ~]$ echo-n "123"; Echo 456
123456
Example 4:echo-e handling special characters
[Email protected] ~]$ echo-e "A\BBCD"
Bcd
[Email protected] ~]$ echo-e "A\NBCD"
A
Bcd
Reference:http://blog.csdn.net/lizhi200404520/article/details/8819762
Linux commands (3) echo