{greater, less}-than: add persistent file descriptor example (#17773)

* Update less-than.md and greater-than.md
This commit is contained in:
Managor
2025-08-26 05:17:14 +03:00
committed by GitHub
parent f0e3a83d61
commit 833e0d84fb
2 changed files with 12 additions and 0 deletions
+8
View File
@@ -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}}`
+4
View File
@@ -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}}`