aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bash.html
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2022-07-07 20:23:13 +0000
committerjohannst <johannst@users.noreply.github.com>2022-07-07 20:23:13 +0000
commit88bc7f1209668aa64b2f110121f6f4a2506b9d0c (patch)
tree3d66d70431a882799d5abc956448ed9fd4169b23 /tools/bash.html
parentda7708c904cc1bfa7bafc8a4bd5742cae0cecb03 (diff)
downloadnotes-88bc7f1209668aa64b2f110121f6f4a2506b9d0c.tar.gz
notes-88bc7f1209668aa64b2f110121f6f4a2506b9d0c.zip
deploy: 8018375d79d74f2911c335337722a719cf87c72e
Diffstat (limited to 'tools/bash.html')
-rw-r--r--tools/bash.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/bash.html b/tools/bash.html
index 72598e3..b8d9c92 100644
--- a/tools/bash.html
+++ b/tools/bash.html
@@ -204,7 +204,7 @@ ${foo/pattern/string} # replace pattern with string when expanding foo
alnum,alpha,ascii,blank,cntrl,digit,graph,lower,
print,punct,space,upper,word,xdigit
</code></pre>
-<p>Wit <code>extglob</code> shell option enabled it is possible to have more powerful
+<p>With <code>extglob</code> shell option enabled it is possible to have more powerful
patterns. In the following <code>pattern-list</code> is one ore more patterns separated
by <code>|</code> char.</p>
<pre><code class="language-bash">?(pattern-list) matches zero or one occurrence of the given patterns
@@ -229,6 +229,11 @@ command &amp;&gt;file
# stderr to stdout &amp; stdout to file
command 2&gt;&amp;1 &gt;file
</code></pre>
+<blockquote>
+<p>The article <a href="https://catonmat.net/bash-one-liners-explained-part-three">Bash One-Liners Explained, Part III: All about
+redirections</a>
+contains some nice visualization to explain bash redirections.</p>
+</blockquote>
<h3><a class="header" href="#explanation" id="explanation">Explanation</a></h3>
<pre><code class="language-bash">j&gt;&amp;i
</code></pre>