mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-30 17:33:50 +08:00
{greater, less}-than: add persistent file descriptor example (#17773)
* Update less-than.md and greater-than.md
This commit is contained in:
@@ -26,3 +26,11 @@
|
||||
- Redirect `stderr` to `stdout` for piping them together:
|
||||
|
||||
`{{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:
|
||||
|
||||
`diff <({{command1}}) <({{command2}})`
|
||||
|
||||
- Open a persistent file descriptor:
|
||||
|
||||
`exec {{3}}<{{path/to/file}}`
|
||||
|
||||
Reference in New Issue
Block a user