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