From 5eda7b0d195669a77cb90045b5a6863d85efa1b2 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sat, 17 May 2025 15:24:23 +0300 Subject: [PATCH] less-than: add example (#16464) * Update less-than.md * Update less-than.md --------- Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com> --- pages/common/less-than.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/common/less-than.md b/pages/common/less-than.md index 5fd7994048..8a38970adc 100644 --- a/pages/common/less-than.md +++ b/pages/common/less-than.md @@ -9,7 +9,7 @@ - Create a here document and pass that into `stdin` (requires a multiline command): -`{{command}} << {{EOF}} {{multiline_data}} {{EOF}}` +`{{command}} << {{EOF}} {{multiline_text}} {{EOF}}` - Create a here string and pass that into `stdin` (achieves the same effect as `echo string |`): @@ -26,3 +26,7 @@ - Disregard leading tabs (good for scripts with indentation but does not work for spaces): `cat <<- {{EOF}} > {{path/to/file.txt}} {{multiline_data}} {{EOF}}` + +- Pass command output to a program as a file descriptor: + +`diff <({{command1}}) <({{command2}})`