ODOC: cat

cat — CATenate files & print on the STDOUT

Summary:

From Jargon File: Catenate is an obscure word meaning “to connect in a series”, which is what the “cat” command does to one or more files.

Cat will conCATenate the FILE(s) / STDIN to STDOUT.

Examples:

$ cat foo — Dump the file named foo to STDOUT (please be careful with the case of the filename)

$ cat File1 File2 File3 — Dump File1, File2 & File3

$ cat -b File — Print the File with Number for Non blank lines

$ cat -s File — Squeeze multiple blank lines to single.

$ cat -A File — Show the Non-Printable Chars also

$ cat > File — Concat the STDIN to STDOUT & FILE. This can be used to quickly create a file with some content. After you have finished typing the contents, press Ctrl+D to save.

Read: info cat

Tech Tags: linux