24 lines
1.2 KiB
JSON
24 lines
1.2 KiB
JSON
{
|
|
"name": "cat",
|
|
"section": 1,
|
|
"title": "concatenate and print files",
|
|
"synopsis": ["cat [OPTION]... [OPERAND]..."],
|
|
"description": "Concatenates operands to stdout. With no operands, reads **`bareStdin(ctx)`**. Operand **`-`** is stdin. When **`process.stdout.write`** exists (host), output uses it so trailing newlines are not altered; otherwise **`ctx.console.log`** is used per chunk.",
|
|
"options": [
|
|
{ "flag": "-n", "meaning": "Number all lines (width 6, tab after number)." },
|
|
{ "flag": "-b", "meaning": "Number non-empty lines only (implies not **`-n`**)." },
|
|
{ "flag": "-A", "meaning": "Equivalent to **`-vET`** (show ends, tabs, and non-printing)." },
|
|
{ "flag": "-e", "meaning": "Like **`-vE`**." },
|
|
{ "flag": "-t", "meaning": "Like **`-vT`**." },
|
|
{ "flag": "-E", "meaning": "Show **$** before each newline." },
|
|
{ "flag": "-T", "meaning": "Show tabs as **^I**." },
|
|
{ "flag": "-v", "meaning": "Show non-printing characters (**^** / **M-** style)." }
|
|
],
|
|
"keywords": ["cat", "bare-os", "coreutils"],
|
|
"examples": [
|
|
{ "caption": "stdout several files", "code": "cat a.txt b.txt" },
|
|
{ "caption": "numbered lines", "code": "cat -n file.txt" },
|
|
{ "caption": "stdin explicitly", "code": "cat - f.txt" }
|
|
]
|
|
}
|