Skip to content

Commit f09340f

Browse files
Managoracuteenvy
andauthored
echo, cat: add stdin example (#19194)
Co-authored-by: Lena Pastwa <[email protected]>
1 parent 7cf80f8 commit f09340f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pages/common/echo.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@
2727
- Print the exit status of the last executed command (Note: In Windows Command Prompt and PowerShell the equivalent commands are `echo %errorlevel%` and `$lastexitcode` respectively):
2828

2929
`echo $?`
30+
31+
- Pass text to another program through `stdin`:
32+
33+
`echo "{{Hello World}}" | {{program}}`

pages/linux/cat.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@
2626
- Display all characters, including tabs, line endings, and non-printing characters:
2727

2828
`cat {{[-A|--show-all]}} {{path/to/file}}`
29+
30+
- Pass file contents to another program through `stdin`:
31+
32+
`cat {{path/to/file}} | {{program}}`

0 commit comments

Comments
 (0)