The order is based on the CENTOS6 series, and the translation is based on the official original meaning.
Cat
Cat-concatenatefiles 1117.www.qixoo.qixoo.com and print on the standard output connection file and printout
Cat [OPTION] ... [FILE] ...
Description description
Concatenate FILE (s), or standard input,to standard output.
-A,--show-all
Equivalent To-vet
-B,--number-nonblank
Number nonempty output lines
-e equivalent To-ve
-E,--show-ends
Display $ at end of each line
-N,--number
Number all output lines
-S,--squeeze-blank
Suppress repeated empty outputlines
-T equivalent TO-VT
-T,--show-tabs
Display TAB characters as ^i
-U (ignored)
-V,--show-nonprinting
Use ^ and m-notation, except FORLFD and TAB
-a displays all and ends with a $ sign, equivalent to-vet, with low utility.
-B Displays all non-empty line numbers. That is, if it is a blank line, the line number is not displayed
-N Displays line numbers for all rows, including blank lines, etc., commonly used
-S compressed blank line, understood to encounter more than three lines of empty lines, only one row, chicken ribs parameter
Concatenate usage of cat:
To create or direct a file for the input content, format:
cat>>file<< XXX content xxx End
Of course, you can cat> or >>file directly.
Merging cat file1 file2 > File3
Cases:
[]# Cat >>1.txt<<abc
>1234567
>abc
[]# Cat>2.txt
Abcdefg
^c
[]# Cat 1.txt 2.txt
1234567
Abcdefg
[]# cat 1.txt 2.txt > 3.txt
[]# Cat 3.txt
1234567
Abcdefg
The above uses 2 different ways to create files and merge the content together.
Print standard output:
Cat+option+file will know Linux, not introduce
Summary: Cat is described in official info, and his usage is to connect and output file contents. It's just that very few people use it in the connection section. Most people only know cat print standard output. When you want to write a simple script, you can write it directly with Cat. Equivalent to an enhanced echo. Practical work is very practical.
Deep usage of Linux cat