summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gemfeed/2022-01-01-bash-golf-part-2.html12
-rw-r--r--gemfeed/atom.xml14
-rw-r--r--gemfeed/index.html2
3 files changed, 22 insertions, 6 deletions
diff --git a/gemfeed/2022-01-01-bash-golf-part-2.html b/gemfeed/2022-01-01-bash-golf-part-2.html
index a90a980d..c21ab180 100644
--- a/gemfeed/2022-01-01-bash-golf-part-2.html
+++ b/gemfeed/2022-01-01-bash-golf-part-2.html
@@ -19,7 +19,7 @@
jgs^^^^^^^`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Art by Joan Stark, mod. by Paul Buetow
</pre>
-<p class="quote"><i>Published by Paul Buetow 2022-01-01</i></p>
+<p class="quote"><i>Published by Paul Buetow 2022-01-01, last updated 2022-01-05</i></p>
<p>This is the second blog post about my Bash Golf series. This series is random Bash tips, tricks and weirdnesses I came across. It's a collection of smaller articles I wrote in an older (in German language) blog, which I translated and refreshed with some new content.</p>
<a class="textlink" href="./2021-11-29-bash-golf-part-1.html">Bash Golf Part 1</a><br />
<a class="textlink" href="./2022-01-01-bash-golf-part-2.html">Bash Golf Part 2 (you are reading this atm.)</a><br />
@@ -56,7 +56,15 @@ Foo
❯ echo Foo 1&gt;&amp;2 2&gt;/dev/null
Foo
</pre>
-<p>This is where you can use grouping (neither of these commands will print out anything to stdout):</p>
+<p class="quote"><i>Update: A reader sent me an email and pointed out that the order of the redirections is important. </i></p>
+<p>As you can see, the following will not print out anything:</p>
+<pre>
+❯ echo Foo 2&gt;/dev/null 1&gt;&amp;2
+❯
+</pre>
+<p>A good description (also pointe out by the reader) can be found here:</p>
+<a class="textlink" href="https://wiki.bash-hackers.org/howto/redirection_tutorial#order_of_redirection_ie_file_2_1_vs_2_1_file">Order of redirection</a><br />
+<p>Ok, back to the original blog post. You can also use grouping here (neither of these commands will print out anything to stdout):</p>
<pre>
❯ { echo Foo 1&gt;&amp;2; } 2&gt;/dev/null
❯ ( echo Foo 1&gt;&amp;2; ) 2&gt;/dev/null
diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml
index 73fd6b3f..12b91ecb 100644
--- a/gemfeed/atom.xml
+++ b/gemfeed/atom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <updated>2022-01-05T21:44:28+00:00</updated>
+ <updated>2022-01-05T21:58:12+00:00</updated>
<title>snonux.de feed</title>
<subtitle>Having fun with computers!</subtitle>
<link href="https://snonux.de/gemfeed/atom.xml" rel="self" />
@@ -30,7 +30,7 @@
jgs^^^^^^^`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Art by Joan Stark, mod. by Paul Buetow
</pre>
-<p class="quote"><i>Published by Paul Buetow 2022-01-01</i></p>
+<p class="quote"><i>Published by Paul Buetow 2022-01-01, last updated 2022-01-05</i></p>
<p>This is the second blog post about my Bash Golf series. This series is random Bash tips, tricks and weirdnesses I came across. It's a collection of smaller articles I wrote in an older (in German language) blog, which I translated and refreshed with some new content.</p>
<a class="textlink" href="https://snonux.de/gemfeed/2021-11-29-bash-golf-part-1.html">Bash Golf Part 1</a><br />
<a class="textlink" href="https://snonux.de/gemfeed/2022-01-01-bash-golf-part-2.html">Bash Golf Part 2 (you are reading this atm.)</a><br />
@@ -67,7 +67,15 @@ Foo
❯ echo Foo 1&gt;&amp;2 2&gt;/dev/null
Foo
</pre>
-<p>This is where you can use grouping (neither of these commands will print out anything to stdout):</p>
+<p class="quote"><i>Update: A reader sent me an email and pointed out that the order of the redirections is important. </i></p>
+<p>As you can see, the following will not print out anything:</p>
+<pre>
+❯ echo Foo 2&gt;/dev/null 1&gt;&amp;2
+❯
+</pre>
+<p>A good description (also pointe out by the reader) can be found here:</p>
+<a class="textlink" href="https://wiki.bash-hackers.org/howto/redirection_tutorial#order_of_redirection_ie_file_2_1_vs_2_1_file">Order of redirection</a><br />
+<p>Ok, back to the original blog post. You can also use grouping here (neither of these commands will print out anything to stdout):</p>
<pre>
❯ { echo Foo 1&gt;&amp;2; } 2&gt;/dev/null
❯ ( echo Foo 1&gt;&amp;2; ) 2&gt;/dev/null
diff --git a/gemfeed/index.html b/gemfeed/index.html
index 188798c8..840035ce 100644
--- a/gemfeed/index.html
+++ b/gemfeed/index.html
@@ -9,7 +9,7 @@
<body>
<h1>snonux.de's Gemfeed</h1>
<h2>Having fun with computers!</h2>
-<a class="textlink" href="./2022-01-01-bash-golf-part-2.html">2022-01-01 (1077 words) - Bash Golf Part 2</a><br />
+<a class="textlink" href="./2022-01-01-bash-golf-part-2.html">2022-01-01 (1134 words) - Bash Golf Part 2</a><br />
<a class="textlink" href="./2021-12-26-how-to-stay-sane-as-a-devops-person.html">2021-12-26 (2101 words) - How to stay sane as a DevOps person </a><br />
<a class="textlink" href="./2021-11-29-bash-golf-part-1.html">2021-11-29 (1281 words) - Bash Golf Part 1</a><br />
<a class="textlink" href="./2021-10-22-defensive-devops.html">2021-10-22 (2276 words) - Defensive DevOps</a><br />