mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-30 20:13:20 +02:00
{greater, less}-than: add persistent file descriptor example (#17773)
* Update less-than.md and greater-than.md
This commit is contained in:
parent
f0e3a83d61
commit
833e0d84fb
2 changed files with 12 additions and 0 deletions
|
@ -26,3 +26,11 @@
|
||||||
- Redirect `stderr` to `stdout` for piping them together:
|
- Redirect `stderr` to `stdout` for piping them together:
|
||||||
|
|
||||||
`{{command1}} 2>&1 | {{command2}}`
|
`{{command1}} 2>&1 | {{command2}}`
|
||||||
|
|
||||||
|
- Open a persistent file descriptor:
|
||||||
|
|
||||||
|
`exec {{3}}>{{path/to/file}}`
|
||||||
|
|
||||||
|
- Write to a custom file descriptor:
|
||||||
|
|
||||||
|
`{{echo text}} >&{{3}}`
|
||||||
|
|
|
@ -30,3 +30,7 @@
|
||||||
- Pass command output to a program as a file descriptor:
|
- Pass command output to a program as a file descriptor:
|
||||||
|
|
||||||
`diff <({{command1}}) <({{command2}})`
|
`diff <({{command1}}) <({{command2}})`
|
||||||
|
|
||||||
|
- Open a persistent file descriptor:
|
||||||
|
|
||||||
|
`exec {{3}}<{{path/to/file}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue