1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 07:18:29 +01:00
tldr/pages/common/cat.md

20 lines
345 B
Markdown
Raw Normal View History

2014-05-10 14:23:41 +02:00
# cat
> Print and concatenate files.
- Print the contents of a file to the standard output:
2014-05-10 14:23:41 +02:00
2015-12-30 03:45:42 +01:00
`cat {{file}}`
2014-05-10 14:23:41 +02:00
- Concatenate several files into the target file:
2014-05-10 14:23:41 +02:00
2015-11-23 23:05:54 +01:00
`cat {{file1}} {{file2}} > {{target-file}}`
2015-12-30 03:45:42 +01:00
2016-01-18 15:23:18 +01:00
- Append several files into the target file:
2015-12-30 03:45:42 +01:00
`cat {{file1}} {{file2}} >> {{target-file}}`
2016-01-18 15:23:18 +01:00
- Number all output lines:
`cat -n {{file}}`