From e0cf59ef9ad7bcdd33356d02270b5f8aa24ae05e Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sat, 12 Oct 2024 08:01:56 +0300 Subject: [PATCH] <: add here strings and documents (#13988) --- pages/common/less-than.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pages/common/less-than.md b/pages/common/less-than.md index e1fdfbe7a..624cc664e 100644 --- a/pages/common/less-than.md +++ b/pages/common/less-than.md @@ -1,9 +1,16 @@ # Less than -> Redirect a file to `stdin`. -> Achieves the same effect as `cat file.txt |`. +> Redirect data to `stdin`. > More information: . -- Redirect a file to `stdin`: +- Redirect a file to `stdin` (achieves the same effect as `cat file.txt |`): `{{command}} < {{path/to/file.txt}}` + +- Create a here document and pass that into `stdin` (requires a multiline command): + +`{{command}} << {{EOF}} {{multiline_data}} {{EOF}}` + +- Create a here string and pass that into `stdin`: + +`{{command}} <<< {{string}}`