You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<content type="html"><p>Having an interactive program that automatically loads questions and checks the solution is immensely helpful to have while learning a topic. I've written <a href="https://github.com/learnbyexample/TUI-apps">TUI apps</a> with plenty of beginner to intermediate level exercises for <code>GNU grep</code>, <code>GNU sed</code> and <code>GNU awk</code>.</p>
@@ -1249,7 +1249,11 @@
1249
1249
</span><span>
1250
1250
</span><span style="color:#7f8989;"># similarly, you can add aliases for the other apps as well
<p>As an alternative, you can install <code>textual</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>
1252
+
<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:</p>
<p>As yet another alternative, you can install <code>textual</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>
1253
1257
<p>Adjust the terminal dimensions for the widgets to appear properly, for example 84x25 (characters x lines).</p>
1254
1258
<blockquote>
1255
1259
<p><img src="/images/info.svg" alt="info" /> 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.</p>
@@ -3744,7 +3748,7 @@ Specifying a greater than <code>0</code> start index when using
3744
3748
<entry xml:lang="en">
3745
3749
<title>Interactive Linux CLI Text Processing Exercises</title>
<content type="html"><p>Having an interactive program that automatically loads questions and checks the solution is wonderful to have while learning a topic. This <a href="https://github.com/learnbyexample/TUI-apps/tree/main/CLI-Exercises">TUI app</a> has 60+ beginner to intermediate level exercises for Linux CLI text processing tools.</p>
@@ -3766,7 +3770,11 @@ Specifying a greater than <code>0</code> start index when using
3766
3770
<pre data-lang="bash" style="background-color:#f5f5f5;color:#1f1f1f;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#7f8989;"># you&#39;ll have to change the path
<p>As an alternative, you can install <code>textual</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 <code>cli_exercises.py</code> file.</p>
3773
+
<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:</p>
<p>As yet another alternative, you can install <code>textual</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 <code>cli_exercises.py</code> file.</p>
3770
3778
<p>Adjust the terminal dimensions for the widgets to appear properly, for example 84x25 (characters x lines).</p>
3771
3779
<br>
3772
3780
<h2 id="video-demo">Video demo<a class="zola-anchor" href="#video-demo" aria-label="Anchor link for: video-demo">π</a></h2>
</span><spanstyle=color:#7f8989;># similarly, you can add aliases for the other apps as well
13
-
</span></code></pre><p>As an alternative, you can install <code>textual</code> (see <ahref=https://textual.textualize.io/getting_started/>Textual documentation</a> for more details), clone my <ahref=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><imgalt=infosrc=/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><h2id=brief-guide>Brief Guide<aaria-label="Anchor link for: brief-guide" class=zola-anchorhref=#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 view reference solutions anytime you want.<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><imgalt=warningsrc=/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><h2id=ebooks>Ebooks<aaria-label="Anchor link for: ebooks" class=zola-anchorhref=#ebooks>π</a></h2><p>The exercise questions in these apps have been adapted from my programming ebooks: <ahref=https://learnbyexample.github.io/books/>https://learnbyexample.github.io/books/</a></p><br><h2id=feedback>Feedback<aaria-label="Anchor link for: feedback" class=zola-anchorhref=#feedback>π</a></h2><p>I'd highly appreciate your feedback. Please file <ahref=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><divclass=post-footer><divclass=post-tags><ahref=https://learnbyexample.github.io/tags/gnu-grep/>#gnu-grep</a><ahref=https://learnbyexample.github.io/tags/gnu-sed/>#gnu-sed</a><ahref=https://learnbyexample.github.io/tags/gnu-awk/>#gnu-awk</a><ahref=https://learnbyexample.github.io/tags/linux/>#linux</a><ahref=https://learnbyexample.github.io/tags/command-line/>#command-line</a><ahref=https://learnbyexample.github.io/tags/exercises/>#exercises</a><ahref=https://learnbyexample.github.io/tags/tui/>#TUI</a><ahref=https://learnbyexample.github.io/tags/textual/>#textual</a></div><hrcolor=#e6e6e6><divclass=post-nav><p><aclass=previoushref=https://learnbyexample.github.io/cli-text-processing-awk-announcement/>β CLI text processing with GNU awk book announcement</a><br><p><aclass=nexthref=https://learnbyexample.github.io/cli-text-processing-sed-announcement/>CLI text processing with GNU sed book announcement β</a><br></div><hrcolor=#e6e6e6><p>π° Use <ahref=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> β Follow me on <ahref=https://twitter.com/learn_byexample>Twitter</a>, <ahref=https://github.com/learnbyexample>GitHub</a> and <ahref=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> π§ Subscribe to <ahref=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hrcolor=#e6e6e6></div></article></div></main></div><scriptsrc=https://learnbyexample.github.io/even.js></script>
13
+
</span></code></pre><p>As an alternative to manually managing such virtual environments, you can use <ahref=https://github.com/pypa/pipx>https://github.com/pypa/pipx</a> instead:<preclass=language-bashdata-lang=bashstyle=background-color:#f5f5f5;color:#1f1f1f;><codeclass=language-bashdata-lang=bash><spanstyle=color:#5597d6;>$</span><span> pipx install grepexercises sedexercises awkexercises
</span></code></pre><p>As yet another alternative, you can install <code>textual</code> (see <ahref=https://textual.textualize.io/getting_started/>Textual documentation</a> for more details), clone my <ahref=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><imgalt=infosrc=/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><h2id=brief-guide>Brief Guide<aaria-label="Anchor link for: brief-guide" class=zola-anchorhref=#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 view reference solutions anytime you want.<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><imgalt=warningsrc=/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><h2id=ebooks>Ebooks<aaria-label="Anchor link for: ebooks" class=zola-anchorhref=#ebooks>π</a></h2><p>The exercise questions in these apps have been adapted from my programming ebooks: <ahref=https://learnbyexample.github.io/books/>https://learnbyexample.github.io/books/</a></p><br><h2id=feedback>Feedback<aaria-label="Anchor link for: feedback" class=zola-anchorhref=#feedback>π</a></h2><p>I'd highly appreciate your feedback. Please file <ahref=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><divclass=post-footer><divclass=post-tags><ahref=https://learnbyexample.github.io/tags/gnu-grep/>#gnu-grep</a><ahref=https://learnbyexample.github.io/tags/gnu-sed/>#gnu-sed</a><ahref=https://learnbyexample.github.io/tags/gnu-awk/>#gnu-awk</a><ahref=https://learnbyexample.github.io/tags/linux/>#linux</a><ahref=https://learnbyexample.github.io/tags/command-line/>#command-line</a><ahref=https://learnbyexample.github.io/tags/exercises/>#exercises</a><ahref=https://learnbyexample.github.io/tags/tui/>#TUI</a><ahref=https://learnbyexample.github.io/tags/textual/>#textual</a></div><hrcolor=#e6e6e6><divclass=post-nav><p><aclass=previoushref=https://learnbyexample.github.io/cli-text-processing-awk-announcement/>β CLI text processing with GNU awk book announcement</a><br><p><aclass=nexthref=https://learnbyexample.github.io/cli-text-processing-sed-announcement/>CLI text processing with GNU sed book announcement β</a><br></div><hrcolor=#e6e6e6><p>π° Use <ahref=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> β Follow me on <ahref=https://twitter.com/learn_byexample>Twitter</a>, <ahref=https://github.com/learnbyexample>GitHub</a> and <ahref=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> π§ Subscribe to <ahref=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hrcolor=#e6e6e6></div></article></div></main></div><scriptsrc=https://learnbyexample.github.io/even.js></script>
0 commit comments