Skip to content

Commit 3cdc0b6

Browse files
gnu awk book announcement
1 parent 493af41 commit 3cdc0b6

File tree

12 files changed

+99
-103
lines changed

12 files changed

+99
-103
lines changed

β€ŽREADME.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ I'm addicted to reading fantasy/sci-fi books, so I have a [blog](https://learnby
66

77
## Posts
88

9+
* [CLI text processing with GNU awk book announcement](https://learnbyexample.github.io/cli-text-processing-awk-announcement/)
910
* [GNU awk idioms explained](https://learnbyexample.github.io/awk-idioms-explained/)
1011
* [Understanding Python re(gex)? book announcement](https://learnbyexample.github.io/understanding-python-regex-announcement/)
1112
* [Coloring matched portions with GNU grep, sed and awk](https://learnbyexample.github.io/coloring-matched-portions-grep-sed-awk/)
@@ -23,7 +24,6 @@ I'm addicted to reading fantasy/sci-fi books, so I have a [blog](https://learnby
2324
* [Festive offers for books on Python, Linux, Regular Expressions and more](https://learnbyexample.github.io/programming-deals-2023/)
2425
* [Understanding JavaScript RegExp book announcement](https://learnbyexample.github.io/understanding-javascript-regexp-announcement/)
2526
* [Perl One-Liners Guide book announcement](https://learnbyexample.github.io/perl-oneliners-guide-announcement/)
26-
* [CLI text processing with GNU awk book announcement](https://learnbyexample.github.io/cli-text-processing-awk-announcement/)
2727
* [Interactive exercises for GNU grep, sed and awk (TUI apps)](https://learnbyexample.github.io/interactive-grep-sed-awk-exercises/)
2828
* [CLI text processing with GNU sed book announcement](https://learnbyexample.github.io/cli-text-processing-sed-announcement/)
2929
* [CLI text processing with GNU grep and ripgrep book announcement](https://learnbyexample.github.io/cli-text-processing-grep-announcement/)

β€Žatom.xml

+88-92
Large diffs are not rendered by default.

β€Žawk-idioms-explained/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@
109109
</span></code></pre><p>Similarly, you can concatenate a string to a number to force string context.<pre class=language-ruby data-lang=ruby style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-ruby data-lang=ruby><span>$ awk </span><span style=color:#d07711;>'BEGIN{n1="5.0"; n2=5; if(n1==n2) print "equal"}'
110110
</span><span>$ awk </span><span style=color:#d07711;>'BEGIN{n1="5.0"; n2=5; if(n1==n2".0") print "equal"}'
111111
</span><span>equal
112-
</span></code></pre><p>See <a href=https://www.gnu.org/software/gawk/manual/gawk.html#Strings-And-Numbers>gawk manual: How awk Converts Between Strings and Numbers</a> for more details.</p><br><h2 id=programming-ebooks>Programming ebooks<a aria-label="Anchor link for: programming-ebooks" class=zola-anchor href=#programming-ebooks>πŸ”—</a></h2><p>Check out <a href=https://learnbyexample.github.io/books/>my ebooks</a> on Regular Expressions, Linux CLI tools, Python and Vim. You can get them all as a single bundle via <a href=https://leanpub.com/b/learnbyexample-all-books>leanpub</a> or <a href=https://learnbyexample.gumroad.com/l/all-books>gumroad</a>.</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/gnu-awk/>#gnu-awk</a><a href=https://learnbyexample.github.io/tags/linux/>#linux</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=next href=https://learnbyexample.github.io/understanding-python-regex-announcement/>Understanding Python re(gex)? book announcement β†’</a><br></div><hr color=#e6e6e6><p>πŸ“° Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> βœ… Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> πŸ“§ Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>
112+
</span></code></pre><p>See <a href=https://www.gnu.org/software/gawk/manual/gawk.html#Strings-And-Numbers>gawk manual: How awk Converts Between Strings and Numbers</a> for more details.</p><br><h2 id=programming-ebooks>Programming ebooks<a aria-label="Anchor link for: programming-ebooks" class=zola-anchor href=#programming-ebooks>πŸ”—</a></h2><p>Check out <a href=https://learnbyexample.github.io/books/>my ebooks</a> on Regular Expressions, Linux CLI tools, Python and Vim. You can get them all as a single bundle via <a href=https://leanpub.com/b/learnbyexample-all-books>leanpub</a> or <a href=https://learnbyexample.gumroad.com/l/all-books>gumroad</a>.</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/gnu-awk/>#gnu-awk</a><a href=https://learnbyexample.github.io/tags/linux/>#linux</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/cli-text-processing-awk-announcement/>← CLI text processing with GNU awk book announcement</a><br><p><a class=next href=https://learnbyexample.github.io/understanding-python-regex-announcement/>Understanding Python re(gex)? book announcement β†’</a><br></div><hr color=#e6e6e6><p>πŸ“° Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> βœ… Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> πŸ“§ Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>

β€Žcli-text-processing-awk-announcement/index.html

+1-1
Large diffs are not rendered by default.

β€Žindex.html

+1-1
Large diffs are not rendered by default.

β€Žinteractive-grep-sed-awk-exercises/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
</span><span style=color:#7f8989;># similarly, you can add aliases for the other apps as well
1313
</span></code></pre><p>As an alternative to manually managing such virtual environments, you can use <a href=https://github.com/pypa/pipx>https://github.com/pypa/pipx</a> instead:<pre class=language-bash data-lang=bash style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-bash data-lang=bash><span style=color:#5597d6;>$</span><span> pipx install grepexercises sedexercises awkexercises
1414
</span><span style=color:#5597d6;>$</span><span> awkexercises
15-
</span></code></pre><p>As yet another alternative, you can install <code>textual==0.85.2</code> (see <a href=https://textual.textualize.io/getting_started/>Textual documentation</a> for more details), clone my <a href=https://github.com/learnbyexample/TUI-apps>TUI-apps repository</a> and run the Python file from respective folders. For example, <code>grep_exercises.py</code> for the <code>grep</code> command.<p>Adjust the terminal dimensions for the widgets to appear properly, for example 84x25 (characters x lines).<blockquote><p><img alt=info src=/images/info.svg> You can use alternative CLI tools to solve these exercises as well. For example, <code>perl</code> instead of <code>GNU awk</code> or <code>ripgrep</code> instead of <code>GNU grep</code> and so on.</blockquote><br><h2 id=brief-guide>Brief Guide<a aria-label="Anchor link for: brief-guide" class=zola-anchor href=#brief-guide>πŸ”—</a></h2><p>You can either click the buttons using mouse or press the key combinations listed below:<ul><li>Press <strong>F1</strong> to view the complete guide from within the app itself.<li>Press <strong>Ctrl+p</strong> and <strong>Ctrl+n</strong> to navigate the questions list.<li>Type the command in the box below the question.<li>Press <strong>Enter</strong> to execute the command. <ul><li>Output would be displayed below the command box.<li>If the output matches the expected results, the command box will turn <em>green</em> and reference solutions will also be shown.<li>Issues due to errors and timeout (about <code>2</code> seconds) will be displayed in <em>red</em>.</ul><li>Press <strong>Ctrl+s</strong> to toggle the reference solution box.<li>Press <strong>Ctrl+t</strong> to toggle between light and dark themes.<li>Press <strong>Ctrl+q</strong> to quit the app.<li>Some basic readline-like shortcuts are supported, for example <strong>Ctrl+u</strong>, <strong>Ctrl+k</strong>, <strong>Ctrl+w</strong>, etc</ul><p>Your progress is automatically saved when you close the app and restored when you launch it again later. Already answered questions will be skipped.<blockquote><p><img alt=warning src=/images/warning.svg> There is no safeguard against the command you are executing. They are treated as if you typed them from a shell session.</blockquote><br><h2 id=ebooks>Ebooks<a aria-label="Anchor link for: ebooks" class=zola-anchor href=#ebooks>πŸ”—</a></h2><p>The exercise questions in these apps have been adapted from my programming ebooks: <a href=https://learnbyexample.github.io/books/>https://learnbyexample.github.io/books/</a></p><br><h2 id=feedback>Feedback<a aria-label="Anchor link for: feedback" class=zola-anchor href=#feedback>πŸ”—</a></h2><p>I'd highly appreciate your feedback. Please file <a href=https://github.com/learnbyexample/TUI-apps/issues>an issue</a> if there are bugs, crashes, etc.<p>Hope you find these TUI apps useful. Happy learning :)</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/gnu-grep/>#gnu-grep</a><a href=https://learnbyexample.github.io/tags/gnu-sed/>#gnu-sed</a><a href=https://learnbyexample.github.io/tags/gnu-awk/>#gnu-awk</a><a href=https://learnbyexample.github.io/tags/linux/>#linux</a><a href=https://learnbyexample.github.io/tags/command-line/>#command-line</a><a href=https://learnbyexample.github.io/tags/exercises/>#exercises</a><a href=https://learnbyexample.github.io/tags/tui/>#TUI</a><a href=https://learnbyexample.github.io/tags/textual/>#textual</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/cli-text-processing-awk-announcement/>← CLI text processing with GNU awk book announcement</a><br><p><a class=next href=https://learnbyexample.github.io/cli-text-processing-sed-announcement/>CLI text processing with GNU sed book announcement β†’</a><br></div><hr color=#e6e6e6><p>πŸ“° Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> βœ… Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> πŸ“§ Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>
15+
</span></code></pre><p>As yet another alternative, you can install <code>textual==0.85.2</code> (see <a href=https://textual.textualize.io/getting_started/>Textual documentation</a> for more details), clone my <a href=https://github.com/learnbyexample/TUI-apps>TUI-apps repository</a> and run the Python file from respective folders. For example, <code>grep_exercises.py</code> for the <code>grep</code> command.<p>Adjust the terminal dimensions for the widgets to appear properly, for example 84x25 (characters x lines).<blockquote><p><img alt=info src=/images/info.svg> You can use alternative CLI tools to solve these exercises as well. For example, <code>perl</code> instead of <code>GNU awk</code> or <code>ripgrep</code> instead of <code>GNU grep</code> and so on.</blockquote><br><h2 id=brief-guide>Brief Guide<a aria-label="Anchor link for: brief-guide" class=zola-anchor href=#brief-guide>πŸ”—</a></h2><p>You can either click the buttons using mouse or press the key combinations listed below:<ul><li>Press <strong>F1</strong> to view the complete guide from within the app itself.<li>Press <strong>Ctrl+p</strong> and <strong>Ctrl+n</strong> to navigate the questions list.<li>Type the command in the box below the question.<li>Press <strong>Enter</strong> to execute the command. <ul><li>Output would be displayed below the command box.<li>If the output matches the expected results, the command box will turn <em>green</em> and reference solutions will also be shown.<li>Issues due to errors and timeout (about <code>2</code> seconds) will be displayed in <em>red</em>.</ul><li>Press <strong>Ctrl+s</strong> to toggle the reference solution box.<li>Press <strong>Ctrl+t</strong> to toggle between light and dark themes.<li>Press <strong>Ctrl+q</strong> to quit the app.<li>Some basic readline-like shortcuts are supported, for example <strong>Ctrl+u</strong>, <strong>Ctrl+k</strong>, <strong>Ctrl+w</strong>, etc</ul><p>Your progress is automatically saved when you close the app and restored when you launch it again later. Already answered questions will be skipped.<blockquote><p><img alt=warning src=/images/warning.svg> There is no safeguard against the command you are executing. They are treated as if you typed them from a shell session.</blockquote><br><h2 id=ebooks>Ebooks<a aria-label="Anchor link for: ebooks" class=zola-anchor href=#ebooks>πŸ”—</a></h2><p>The exercise questions in these apps have been adapted from my programming ebooks: <a href=https://learnbyexample.github.io/books/>https://learnbyexample.github.io/books/</a></p><br><h2 id=feedback>Feedback<a aria-label="Anchor link for: feedback" class=zola-anchor href=#feedback>πŸ”—</a></h2><p>I'd highly appreciate your feedback. Please file <a href=https://github.com/learnbyexample/TUI-apps/issues>an issue</a> if there are bugs, crashes, etc.<p>Hope you find these TUI apps useful. Happy learning :)</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/gnu-grep/>#gnu-grep</a><a href=https://learnbyexample.github.io/tags/gnu-sed/>#gnu-sed</a><a href=https://learnbyexample.github.io/tags/gnu-awk/>#gnu-awk</a><a href=https://learnbyexample.github.io/tags/linux/>#linux</a><a href=https://learnbyexample.github.io/tags/command-line/>#command-line</a><a href=https://learnbyexample.github.io/tags/exercises/>#exercises</a><a href=https://learnbyexample.github.io/tags/tui/>#TUI</a><a href=https://learnbyexample.github.io/tags/textual/>#textual</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/perl-oneliners-guide-announcement/>← Perl One-Liners Guide book announcement</a><br><p><a class=next href=https://learnbyexample.github.io/cli-text-processing-sed-announcement/>CLI text processing with GNU sed book announcement β†’</a><br></div><hr color=#e6e6e6><p>πŸ“° Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> βœ… Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> πŸ“§ Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>

0 commit comments

Comments
Β (0)