summaryrefslogtreecommitdiff
path: root/Base/usr/share/man/man1/cat.md
blob: bb51b19abada720006716971caff7e7ce693fdd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
## Name

cat - concatenate files to stdout

## Synopsis

```**sh
$ cat [file...]
```

## Description

This program passes contents of specified `files` to standard output, in the specified order. If no `file` is specified, or it is `-`, it defaults to standard input.

## Arguments

* `file`: Files to print

## Examples

```sh
# Display a single file
$ cat README.md
# SerenityOS

Graphical Unix-like operating system for x86 computers.
...

# Display standard input
$ cat
aaa
aaa
bbb
bbb^C

# Display ls output where each file is in separate line
$ ls | cat
Desktop
Documents
Downloads
README.md
Source
js-tests
tests
web-tests

# Display multiple files
$ echo 123 > test.txt
$ echo 456 > test2.txt
cat test.txt test2.txt
123
456
```