From 01cb49ff905e4f33f0b251c06df4b15da3a722c6 Mon Sep 17 00:00:00 2001 From: Dillon Flamand Date: Sat, 31 Mar 2018 22:30:06 -0700 Subject: [PATCH 1/2] Expand on "here document" The here document description was poor, add a bit of detail, a small example, and a link for more information. --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 79bb735..a36d3a1 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,13 @@ Notes: } ``` -- Know about "here documents" in Bash, as in `cat <logfile 2>&1` or `some-command &>logfile`. Often, to ensure a command does not leave an open file handle to standard input, tying it to the terminal you are in, it is also good practice to add ` Date: Sat, 7 Apr 2018 13:21:21 -0700 Subject: [PATCH 2/2] Shorten language on heredocs. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a36d3a1..5a65700 100644 --- a/README.md +++ b/README.md @@ -156,11 +156,11 @@ Notes: } ``` -- A "here document" is a code structure that is treated as if it were a separate file. They can be used to feed multiple lines into a command. Consider reading more about ["here documents"](https://www.tldp.org/LDP/abs/html/here-docs.html). A simple example is: +- A "here document" allows [redirection of multiple lines of input](https://www.tldp.org/LDP/abs/html/here-docs.html) as if from a file: ``` -cat << EOF -These lines will -print to stdout +cat <