Linux Command -- cat, linux -- cat
Cat function: 1. output text content to the screen 2. output text content to another file
Parameter description:
-N: numbers all rows.
-B: no blank row number
-S: multiple consecutive blank rows are displayed as single rows.
Example:
---------------------------------------------------
20171.txt text content
[Root @ test tools] # cat 1.txt
C
D
E
F
G
---------------------------------------------------
Upload 1.txt text and number all rows
[Root @ test tools] # cat-n 1.txt
1c
2
3d
4e
5
6
7f
8
9
10
11g
-----------------------------------------------------
Only numbers non-blank rows.
[Root @ test tools] # cat-B 1.txt
1c
2d
3e
4f
5g
-----------------------------------------------------
Contains 1.txt text. multiple lines of blank lines are displayed as one line.
[Root @ test tools] # cat-s 1.txt
C
D
E
F
G
-----------------------------------------------------
Output 1.txt content to 2.txt, and then 2.txt content.
[Root @ test tools] # cat 1.txt> 2.txt
[Root @ test tools] # cat 2.txt
C
D
E
F
G
-----------------------------------------------------