From eb00419cdcc41047d2941addc53cce54c5d375f0 Mon Sep 17 00:00:00 2001 From: Jessica Stokes Date: Fri, 21 Sep 2018 12:15:43 -0700 Subject: [PATCH] tee: add `tee /dev/tty` mid-pipeline example (#2343) --- pages/common/tee.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/tee.md b/pages/common/tee.md index f42246715..e29eabd21 100644 --- a/pages/common/tee.md +++ b/pages/common/tee.md @@ -10,6 +10,10 @@ `echo "example" | tee -a {{FILE}}` +- Print standard input to the terminal, and also pipe it into another program for further processing: + +`echo "example" | tee {{/dev/tty}} | {{xargs printf "[%s]"}}` + - Create a folder called "example", count the number of characters in "example" and write "example" to the terminal: `echo "example" | tee >(xargs mkdir) >(wc -c)`