From 90f25a7e6283b44e5537afa46774c9dc4daf8e45 Mon Sep 17 00:00:00 2001 From: Polle Vanhoof Date: Thu, 26 Oct 2017 16:25:39 +0200 Subject: [PATCH] tee: Add usecase for process substitution --- pages/common/tee.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/common/tee.md b/pages/common/tee.md index bc9070a122..39a5a41b00 100644 --- a/pages/common/tee.md +++ b/pages/common/tee.md @@ -1,6 +1,6 @@ # tee -> Read from standard input and write to standard output and files. +> Read from standard input and write to standard output and files (or commands). - Copy standard input to each FILE, and also to standard output: @@ -9,3 +9,7 @@ - Append to the given FILEs, do not overwrite: `echo "example" | tee -a {{FILE}}` + +- Create a folder called "example", print "example" and write "example" to FILE: + +`echo "example" | tee >(xargs mkdir) >(cat) >{{FILE}}`