Cat commands use Linux redirection to merge files
Cat commands use Linux redirection to merge files
Take a look at the document:
[Doctor @ localhost Documents] $ <strong> cat -- help </strong>
Usage: cat [Option]... [file]...
Output A [file] or a combination of standard input to standard output.
-A, -- show-all equals-vET
-B, -- number-nonblank: number of non-empty output rows
-E equals to-vE
-E, -- show-ends: "$" is displayed at the end of each line"
-N, -- number indicates the number of all rows output.
-S, -- squeeze-blank does not output multiple empty rows
-T is equivalent to-vT.
-T, -- show-tabs: display the Skip character as ^ I
-U (ignored)
-V, -- show-nonprinting use ^ and M-reference, except LFD and TAB
-- Help: displays the help information and exits.
-- Version: displays the version information and exits.
If no file is specified or the file is "-", it is read from the standard input.
Example:
Cat f-g first outputs the content of f, then outputs the content of standard input, and finally outputs the content of g.
Cat copies the content of the standard input to the standard output.
Merge several files using commands
Cat a.txt B .txt> c.txt
Or
Cat a.txt B .txt> c.txt
The difference is that the first file is created or the file is truncated. The second is appended to the end of the file (the file does not exist ).
How to compile cat commands in Linux?
13 Cat command Management (display, sort, create) file instances
20 required commands for Linux beginners
This article permanently updates the link address: