cat
Options
--show-all,-A-
equivalent to -vET
--number-nonblank,-b-
number nonempty output lines, overrides -n
-e-
equivalent to -vE
--show-ends,-E-
display $ at end of each line
--number,-n-
number all output lines
--squeeze-blank,-s-
suppress repeated empty output lines
-t-
equivalent to -vT
--show-tabs,-T-
display TAB characters at ^I
--show-nonprinting,-v-
use ^ and M- notation, except for LF (\n) and TAB (\t)
-u-
(ignored)
Examples
Print the contents of a file to stdout:
cat {{path/to/file}}
Concatenate several files into an output file:
cat {{path/to/file1 path/to/file2 ...}} > {{path/to/output_file}}
Append several files to an output file:
cat {{path/to/file1 path/to/file2 ...}} >> {{path/to/output_file}}
Copy the contents of a file into an output file without buffering:
cat -u {{/dev/tty12}} > {{/dev/tty13}}
Write stdin to a file:
cat - > {{path/to/file}}
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.