The Shell Hater's Handbook (2010)

by samlamberton 11/1/2024, 5:22 PMwith 53 comments

by packetloston 11/1/2024, 6:59 PM

YouTube link for video if it's broken for others and not just me:

https://www.youtube.com/watch?v=olH-9b3VJfs

Something I learned recently is that the Bourne shell (and by extension, bash and POSIX's sh) have syntax inspired by Algol 68 (source [0]), which explains some of the funkyness. One thing I've been doing recently is writing scripts in rc, the default shell for plan9. It's a bit saner syntax-wise IMO. Versions linked against readline have file-based completion, but it's otherwise not quite robust enough for me to switch away from fish as my default, but it has some things I prefer over both bash and fish.

I encourage people to give rc and awk a shot, they're both small and learnable in an afternoon!

[0]: https://doc.cat-v.org/plan_9/4th_edition/papers/rc

by hamandcheeseon 11/1/2024, 8:15 PM

I've grown rather fond of bash in my current role. I work mainly on developer tools and CI pipelines, both of which mean gluing together lots of different CLI tools. When it comes to this kind of work I think it is quite hard to beat the expressiveness of shell scripting. I say this as a former hater of bash and its syntax.

Much credit to copilot and shellcheck, which have made complex bash ever the more write-only language than it already was.

by genezetaon 11/1/2024, 5:54 PM

(2010)

Sadly the video seems to be missing; the whole GoGaRuCo conference site is gone, actually.

Maybe it makes more sense to post the link to YT, as you did in 2022 https://news.ycombinator.com/item?id=32521080

by yanowitzon 11/1/2024, 7:37 PM

And its inspiration is still great but could use a refresh: https://web.mit.edu/~simsong/www/ugh.pdf

by Eisensteinon 11/1/2024, 6:31 PM

Getting a DNS error from confreaks.

You can get the video here:

* https://web.archive.org/web/20140207100122/http://confreaks....

by lprovenon 11/2/2024, 1:23 PM

A video is not a handbook. A handbook is a book. There's a clue in the name.

Life is too short for videos.

by nlawalkeron 11/1/2024, 8:38 PM

I'm not familiar with the landscape - is there a "compiles to reasonably-readable [ba]sh" language that's gotten any traction anywhere? That seems like at least an interesting possible solution.

by phendrenad2on 11/3/2024, 11:39 AM

If you're a shell hater, the answer isn't to write MORE shell, but to switch to something else, for the love of all things sane and normal.