I disagree on the premise that the author is "using" shell. Often when reading about why the command line / shell is better than GUI, the salient advantage comes down to one thing, scripting. Yet scripting in an IDE, which is a GUI, is a ton easier than in vim, simply because the surface for discovery of actions is much more transparent.<p>If scripting were to be excluded, the belittling of GUIs falls a bit flat. I'd like to see graphic design work be done via CLI.
I was pretty close in guessing what they believe was "wrong" (or really, superfluous) with their initial shell script example.<p>I'd even drop the "if" from their footnote version, and go with simply<p><pre><code> npm install || (echo "boom" && exit)
</code></pre>
(Not exactly equivalent because there won't be an "exit" if echo fails, but it's my preferred instict over ";") Also, "(" starts a subshell, if we are being pedantic.
There is, of course, a programming language designed to do shelly things as succinctly as a shell script: Perl.
Also Scsh[0].<p>[0]: <a href="https://en.wikipedia.org/wiki/Scsh" rel="nofollow">https://en.wikipedia.org/wiki/Scsh</a>
I was amused to see DeepSeek using it recently, as I didn't realize it was installed on my machine (macos with brew).<p>Ruby is much, much prettier for similar purposes though, and so that's what I'll learn if I ever need to do this more frequently.
I was sure this article would be about how we tell computers to do things now (writing prompts to an AI in plain English). I was wrong. Interesting nonetheless.
On the higher level question in the article of why do people not use their main languages for basic file and command management?<p>I believe the answer is the same as to why Python remains hugely popular despite all the well-documented shortcomings: <i>batteries included</i>.<p>Shell languages include so many neat and concise ways to execute commands, deal with their input, output and exit codes, allow simple traversal of deep directory structures with globs and advanced tools like 'find' or 'xargs', that everything else is very unergonomic.<p>And niche by default (until it gets used widely enough), so even your LANG-OF-CHOICE-expert you recruit, they will not know a thing about that shell-focused library in LANG-OF-CHOICE.
TIL that the duckdb REPL supports reading json files (<a href="https://duckdb.org/docs/current/data/json/overview" rel="nofollow">https://duckdb.org/docs/current/data/json/overview</a>). This might actually be useful the next time I need to investigate a massive json file (`jq` can only go so far).
That philosophical point about what it even means to "tell a computer to do things" is a good one. Sure, clicking around in a GUI is also telling the computer what to do. But there's a huge difference between using someone else's abstraction and building your own from scratch. The article is about that second part - the ability to throw stuff together however you want. With a GUI, you're stuck with whatever the designer thought of. With a shell, you can build just about anything
Nice article about actually learning stuff and putting this knowledge to use together. Not with AI but with one’s own brain.
Good advice. I've gotten a ton of utility out of my shell without learning very many tools particularly well.<p>If you take nothing else away from this, memorize the syntax of one-liner for loops, it has saved me so many times.
Your next homework assignment is to write your own scripting language that emits asm. Then you'll be one step closer to understanding what it really means to tell your computer to do things!
Why are we assuming using the terminal is the only way of "telling a computer to do things"? Every way you interact with a machine, you are telling it to do things in theory.<p>For example<p>> At a fundamental level, I wasn’t able to tell my computer to accomplish anything that involved logic or stitching together multiple programs<p>How can that be true if you are telling it to boot on into a os? It doesn't involve logic? Or stiching together multiple programs?<p>Using a shell =\= telling a machine what to do on a broad level. You are just using the abstractions provided by the os. If you mean get better at shell so you can use it more efficiently than okay cool but that doesn't someone who uses a GUI doesn't "tell" the machine what to do as much as you.
[flagged]