Skip to content

Commit f75e087

Browse files
cli computing book announcement
1 parent 7f1b2b0 commit f75e087

File tree

19 files changed

+97
-277
lines changed

19 files changed

+97
-277
lines changed

β€ŽREADME.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ I'm addicted to reading fantasy/sci-fi books, so I have a [blog](https://learnby
66

77
## Posts
88

9+
* [Computing from the Command Line book announcement](https://learnbyexample.github.io/computing-from-the-command-line-announcement/)
10+
* [Sufficiently Advanced AI feels magical](https://learnbyexample.github.io/sufficiently-advanced-ai/)
911
* [Python 3.11: possessive quantifiers added to re module](https://learnbyexample.github.io/python-regex-possessive-quantifier/)
1012
* [Vim Reference Guide book announcement](https://learnbyexample.github.io/vim-reference-guide-announcement/)
1113
* [Removing duplicates irrespective of field order](https://learnbyexample.github.io/duplicates-irrespective-field-order/)

β€Ža-short-and-satisfying-bug-hunt/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@
4040
</span><span style=color:#5597d6;>Not</span><span> fine
4141
</span><span style=color:#5597d6;>$ </span><span style=color:#72ab00;>[</span><span>[ </span><span style=color:#d07711;>'a[5]'</span><span> == </span><span style=color:#d07711;>'a[5]' </span><span style=color:#72ab00;>]</span><span>] </span><span style=color:#72ab00;>&& </span><span style=color:#b39f04;>echo </span><span style=color:#d07711;>'fine'
4242
</span><span style=color:#5597d6;>fine
43-
</span></code></pre><p>Having a minimal failing case from terminal was a relief. I tried <code>set -x</code> but that didn't light a bulb either. Finally, somehow I thought perhaps characters in the output was causing the issue and when <code>[]</code> characters were not present, the comparison worked as expected.<p>I did think quoting could be the issue, but dismissed it at first as both sides of comparison had the same command. Then my recent experience from reviewing <a href=https://www.packtpub.com/application-development/command-line-fundamentals>Command Line Fundamentals</a> book came in handy. I remembered that if quotes aren't used on RHS of comparison operator, it is treated as <code>glob</code> matching instead of string matching. Phew.<h2 id=tl-dr>TL;DR<a aria-label="Anchor link for: tl-dr" class=zola-anchor href=#tl-dr>πŸ”—</a></h2><p>Always <a href=https://unix.stackexchange.com/questions/131766/why-does-my-shell-script-choke-on-whitespace-or-other-special-characters>quote strings in bash</a> unless you have a very good reason for not using them.<p>After adding double quotes around the command substitution commands, the script worked as expected. I thanked the user for opening the issue. And then informed the author for cli fundamentals book as well.</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/shell-scripting/>#shell scripting</a><a href=https://learnbyexample.github.io/tags/debugging/>#debugging</a><a href=https://learnbyexample.github.io/tags/corner-case/>#corner case</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/python-for-maths/>← Python for maths</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>
43+
</span></code></pre><p>Having a minimal failing case from terminal was a relief. I tried <code>set -x</code> but that didn't light a bulb either. Finally, somehow I thought perhaps characters in the output was causing the issue and when <code>[]</code> characters were not present, the comparison worked as expected.<p>I did think quoting could be the issue, but dismissed it at first as both sides of comparison had the same command. Then my recent experience from reviewing <a href=https://www.packtpub.com/application-development/command-line-fundamentals>Command Line Fundamentals</a> book came in handy. I remembered that if quotes aren't used on RHS of comparison operator, it is treated as <code>glob</code> matching instead of string matching. Phew.<h2 id=tl-dr>TL;DR<a aria-label="Anchor link for: tl-dr" class=zola-anchor href=#tl-dr>πŸ”—</a></h2><p>Always <a href=https://unix.stackexchange.com/questions/131766/why-does-my-shell-script-choke-on-whitespace-or-other-special-characters>quote strings in bash</a> unless you have a very good reason for not using them.<p>After adding double quotes around the command substitution commands, the script worked as expected. I thanked the user for opening the issue. And then informed the author for cli fundamentals book as well.</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/shell-scripting/>#shell-scripting</a><a href=https://learnbyexample.github.io/tags/debugging/>#debugging</a><a href=https://learnbyexample.github.io/tags/corner-case/>#corner-case</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/python-for-maths/>← Python for maths</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>

β€Žatom.xml

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,79 @@
55
<link href="https://learnbyexample.github.io/atom.xml" rel="self" type="application/atom+xml"/>
66
<link href="https://learnbyexample.github.io"/>
77
<generator uri="https://www.getzola.org/">Zola</generator>
8-
<updated>2022-10-26T00:00:00+00:00</updated>
8+
<updated>2022-11-01T00:00:00+00:00</updated>
99
<id>https://learnbyexample.github.io/atom.xml</id>
10+
<entry xml:lang="en">
11+
<title>Computing from the Command Line book announcement</title>
12+
<published>2022-11-01T00:00:00+00:00</published>
13+
<updated>2022-11-01T00:00:00+00:00</updated>
14+
<link rel="alternate" href="https://learnbyexample.github.io/computing-from-the-command-line-announcement/" type="text/html"/>
15+
<id>https://learnbyexample.github.io/computing-from-the-command-line-announcement/</id>
16+
<content type="html">&lt;p&gt;Hello!&lt;&#x2F;p&gt;
17+
&lt;p&gt;I am pleased to announce my thirteenth ebook &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;learnbyexample&#x2F;cli-computing&quot;&gt;Computing from the Command Line&lt;&#x2F;a&gt;. This is the longest book I&#x27;ve published so far (203 pages) and it took me more than 7 months to complete the first version.&lt;&#x2F;p&gt;
18+
&lt;p&gt;This ebook aims to teach &lt;strong&gt;Linux command line tools and Shell Scripting&lt;&#x2F;strong&gt; for &lt;strong&gt;beginner to intermediate&lt;&#x2F;strong&gt; level users. The main focus is towards &lt;strong&gt;managing your files&lt;&#x2F;strong&gt; and performing &lt;strong&gt;text processing tasks&lt;&#x2F;strong&gt;. Plenty of &lt;strong&gt;examples&lt;&#x2F;strong&gt; are provided to make it easier to understand a particular tool and its various features. &lt;strong&gt;Exercises&lt;&#x2F;strong&gt; at the end of chapters will help you practice what you&#x27;ve learned and &lt;strong&gt;solutions&lt;&#x2F;strong&gt; are provided for reference. I hope this ebook would make it much easier for you to discover CLI tools, features and learning resources than my own blundering experience.&lt;&#x2F;p&gt;
19+
&lt;span id=&quot;continue-reading&quot;&gt;&lt;&#x2F;span&gt;&lt;br&gt;
20+
&lt;h2 id=&quot;release-offers&quot;&gt;Release offers&lt;a class=&quot;zola-anchor&quot; href=&quot;#release-offers&quot; aria-label=&quot;Anchor link for: release-offers&quot;&gt;πŸ”—&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
21+
&lt;p&gt;To celebrate my latest ebook release, you can download PDF&#x2F;EPUB versions of &lt;strong&gt;Computing from the Command Line&lt;&#x2F;strong&gt; for FREE till 08-Nov-2022. You can still pay if you wish ;)&lt;&#x2F;p&gt;
22+
&lt;ul&gt;
23+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.gumroad.com&#x2F;l&#x2F;cli_computing&quot;&gt;https:&#x2F;&#x2F;learnbyexample.gumroad.com&#x2F;l&#x2F;cli_computing&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
24+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;leanpub.com&#x2F;cli_computing&quot;&gt;https:&#x2F;&#x2F;leanpub.com&#x2F;cli_computing&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
25+
&lt;&#x2F;ul&gt;
26+
&lt;p&gt;Some of my ebooks and bundles are on sale as well till 08-Nov-2022:&lt;&#x2F;p&gt;
27+
&lt;ul&gt;
28+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.gumroad.com&#x2F;l&#x2F;cli_coreutils&#x2F;cli_computing_release&quot;&gt;Command line text processing with GNU Coreutils&lt;&#x2F;a&gt; is FREE&lt;&#x2F;li&gt;
29+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.gumroad.com&#x2F;l&#x2F;oneliners&#x2F;cli_computing_release&quot;&gt;Magical one-liners&lt;&#x2F;a&gt; bundle is $5 (normal price $15) β€” grep, sed, awk, perl and ruby one-liners&lt;&#x2F;li&gt;
30+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.gumroad.com&#x2F;l&#x2F;all-books&#x2F;cli_computing_release&quot;&gt;All books bundle&lt;&#x2F;a&gt; is $10 (normal price $28) β€” all my 13 programming ebooks&lt;&#x2F;li&gt;
31+
&lt;&#x2F;ul&gt;
32+
&lt;br&gt;
33+
&lt;h2 id=&quot;videos&quot;&gt;Videos&lt;a class=&quot;zola-anchor&quot; href=&quot;#videos&quot; aria-label=&quot;Anchor link for: videos&quot;&gt;πŸ”—&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
34+
&lt;p&gt;Here&#x27;s a short video about the &lt;strong&gt;Computing from the Command Line&lt;&#x2F;strong&gt; ebook:&lt;&#x2F;p&gt;
35+
&lt;p align=&quot;center&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;PS5XEemn164&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;&lt;&#x2F;p&gt;
36+
&lt;p&gt;Last November, I started &lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;tips&#x2F;&quot;&gt;posting tips&lt;&#x2F;a&gt; covering Python, command line tools and Vim. After getting comfortable with recording videos, I added demos for these tips as well:&lt;&#x2F;p&gt;
37+
&lt;ul&gt;
38+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=THSMmCZQn1A&amp;amp;list=PLTv2U3HnAL4PlFDiH3FXTHXRbhWs2sB3F&quot;&gt;Python tips&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
39+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=p0KCLusMd5Q&amp;amp;list=PLTv2U3HnAL4PNTmRqZBSUgKaiHbRL2zeY&quot;&gt;Linux command line tips&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
40+
&lt;&#x2F;ul&gt;
41+
&lt;br&gt;
42+
&lt;h2 id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;a class=&quot;zola-anchor&quot; href=&quot;#table-of-contents&quot; aria-label=&quot;Anchor link for: table-of-contents&quot;&gt;πŸ”—&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
43+
&lt;ol&gt;
44+
&lt;li&gt;Preface&lt;&#x2F;li&gt;
45+
&lt;li&gt;Introduction and Setup&lt;&#x2F;li&gt;
46+
&lt;li&gt;Command Line Overview&lt;&#x2F;li&gt;
47+
&lt;li&gt;Managing Files and Directories&lt;&#x2F;li&gt;
48+
&lt;li&gt;Shell Features&lt;&#x2F;li&gt;
49+
&lt;li&gt;Viewing Part or Whole File Contents&lt;&#x2F;li&gt;
50+
&lt;li&gt;Searching Files and Filenames&lt;&#x2F;li&gt;
51+
&lt;li&gt;File Properties&lt;&#x2F;li&gt;
52+
&lt;li&gt;Managing Processes&lt;&#x2F;li&gt;
53+
&lt;li&gt;Multipurpose Text Processing Tools&lt;&#x2F;li&gt;
54+
&lt;li&gt;Sorting Stuff&lt;&#x2F;li&gt;
55+
&lt;li&gt;Comparing Files&lt;&#x2F;li&gt;
56+
&lt;li&gt;Assorted Text Processing Tools&lt;&#x2F;li&gt;
57+
&lt;li&gt;Shell Scripting&lt;&#x2F;li&gt;
58+
&lt;li&gt;Shell Customization&lt;&#x2F;li&gt;
59+
&lt;&#x2F;ol&gt;
60+
&lt;br&gt;
61+
&lt;h2 id=&quot;web-version&quot;&gt;Web version&lt;a class=&quot;zola-anchor&quot; href=&quot;#web-version&quot; aria-label=&quot;Anchor link for: web-version&quot;&gt;πŸ”—&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
62+
&lt;p&gt;You can also read the book online here: &lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;cli-computing&#x2F;&quot;&gt;https:&#x2F;&#x2F;learnbyexample.github.io&#x2F;cli-computing&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
63+
&lt;br&gt;
64+
&lt;h2 id=&quot;github-repo&quot;&gt;GitHub repo&lt;a class=&quot;zola-anchor&quot; href=&quot;#github-repo&quot; aria-label=&quot;Anchor link for: github-repo&quot;&gt;πŸ”—&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
65+
&lt;p&gt;Visit &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;learnbyexample&#x2F;cli-computing&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;learnbyexample&#x2F;cli-computing&lt;&#x2F;a&gt; for markdown source, example files, exercise solutions, sample chapters and other details related to the book.&lt;&#x2F;p&gt;
66+
&lt;br&gt;
67+
&lt;h2 id=&quot;newsletter&quot;&gt;Newsletter&lt;a class=&quot;zola-anchor&quot; href=&quot;#newsletter&quot; aria-label=&quot;Anchor link for: newsletter&quot;&gt;πŸ”—&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
68+
&lt;p&gt;Subscribe to &lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.gumroad.com&#x2F;l&#x2F;learnbyexample-weekly&quot;&gt;learnbyexample weekly&lt;&#x2F;a&gt; β€” free newsletter covering programming resources, updates on what I am creating, tips, tools, free ebooks and more, delivered every Friday.&lt;&#x2F;p&gt;
69+
&lt;br&gt;
70+
&lt;h2 id=&quot;feedback-and-errata&quot;&gt;Feedback and Errata&lt;a class=&quot;zola-anchor&quot; href=&quot;#feedback-and-errata&quot; aria-label=&quot;Anchor link for: feedback-and-errata&quot;&gt;πŸ”—&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
71+
&lt;p&gt;I would highly appreciate if you&#x27;d &lt;strong&gt;let me know how you felt about this book&lt;&#x2F;strong&gt;. It could be anything from a simple thank you, Gumroad rating, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn&#x27;t!) and so on. Reader feedback is essential and especially so for self-published authors.&lt;&#x2F;p&gt;
72+
&lt;p&gt;You can reach me via:&lt;&#x2F;p&gt;
73+
&lt;ul&gt;
74+
&lt;li&gt;Issue Manager: &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;learnbyexample&#x2F;cli-computing&#x2F;issues&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;learnbyexample&#x2F;cli-computing&#x2F;issues&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
75+
&lt;li&gt;E-mail: &lt;code&gt;echo &#x27;bGVhcm5ieWV4YW1wbGUubmV0QGdtYWlsLmNvbQo=&#x27; | base64 --decode&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
76+
&lt;li&gt;Twitter: &lt;a href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;learn_byexample&quot;&gt;https:&#x2F;&#x2F;twitter.com&#x2F;learn_byexample&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
77+
&lt;&#x2F;ul&gt;
78+
&lt;p&gt;Happy learning :)&lt;&#x2F;p&gt;
79+
</content>
80+
</entry>
1081
<entry xml:lang="en">
1182
<title>Python tip 18: arbitrary number of arguments</title>
1283
<published>2022-10-26T00:00:00+00:00</published>

0 commit comments

Comments
Β (0)