From 90f25a7e6283b44e5537afa46774c9dc4daf8e45 Mon Sep 17 00:00:00 2001 From: Polle Vanhoof Date: Thu, 26 Oct 2017 16:25:39 +0200 Subject: [PATCH 1/6] 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 bc9070a12..39a5a41b0 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}}` From 6cc2bfaccb0f7741c9aae7d0d4c45e41cdcd2a08 Mon Sep 17 00:00:00 2001 From: Polle Vanhoof Date: Thu, 26 Oct 2017 19:50:49 +0200 Subject: [PATCH 2/6] tee: update language as per remarks --- pages/common/tee.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/tee.md b/pages/common/tee.md index 39a5a41b0..713d47a42 100644 --- a/pages/common/tee.md +++ b/pages/common/tee.md @@ -10,6 +10,6 @@ `echo "example" | tee -a {{FILE}}` -- Create a folder called "example", print "example" and write "example" to FILE: +- Create a folder called "example", print "example" and write "example" to the specified file: -`echo "example" | tee >(xargs mkdir) >(cat) >{{FILE}}` +`echo "example" | tee >(xargs mkdir) >(cat) >path/to/file` From d8fc8ce6f1dc8d8fa564471910a9f40107b36472 Mon Sep 17 00:00:00 2001 From: Polle Vanhoof Date: Fri, 27 Oct 2017 12:23:17 +0200 Subject: [PATCH 3/6] tee: final cleanup formatting --- pages/common/tee.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/tee.md b/pages/common/tee.md index 713d47a42..8f955a376 100644 --- a/pages/common/tee.md +++ b/pages/common/tee.md @@ -12,4 +12,4 @@ - Create a folder called "example", print "example" and write "example" to the specified file: -`echo "example" | tee >(xargs mkdir) >(cat) >path/to/file` +`echo "example" | tee >(xargs mkdir) >(cat) >{{path/to/file}}` From 877e017f00ebbac1acac21e9cf9f21f43106cdd3 Mon Sep 17 00:00:00 2001 From: Polle Vanhoof Date: Sat, 28 Oct 2017 12:20:16 +0200 Subject: [PATCH 4/6] tee: proposed change for review --- pages/common/tee.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/tee.md b/pages/common/tee.md index 8f955a376..e0208a6f3 100644 --- a/pages/common/tee.md +++ b/pages/common/tee.md @@ -10,6 +10,6 @@ `echo "example" | tee -a {{FILE}}` -- Create a folder called "example", print "example" and write "example" to the specified file: +- Create a folder called "example", count the number of characters in "example and write "example" to the terminal: -`echo "example" | tee >(xargs mkdir) >(cat) >{{path/to/file}}` +`echo "example" | tee >(xargs mkdir) >(wc -c) From 71ad96a7e5116b6c44696df72c20469b59fafe62 Mon Sep 17 00:00:00 2001 From: Polle Vanhoof Date: Sat, 28 Oct 2017 12:40:48 +0200 Subject: [PATCH 5/6] tee: add missing backtick --- pages/common/tee.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/tee.md b/pages/common/tee.md index e0208a6f3..216a6457a 100644 --- a/pages/common/tee.md +++ b/pages/common/tee.md @@ -12,4 +12,4 @@ - 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) +`echo "example" | tee >(xargs mkdir) >(wc -c)` From f3e1e62cdf955a150bb0b04512647986accb6fad Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Sat, 28 Oct 2017 16:49:38 +0530 Subject: [PATCH 6/6] tee.md: added missing quotes --- pages/common/tee.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/tee.md b/pages/common/tee.md index 216a6457a..f42246715 100644 --- a/pages/common/tee.md +++ b/pages/common/tee.md @@ -10,6 +10,6 @@ `echo "example" | tee -a {{FILE}}` -- Create a folder called "example", count the number of characters in "example and write "example" to the terminal: +- 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)`