The corner cases are exactly where the learning is though. Every time you hit one unquoted spaces, escaped characters, subshell expansion — you understand something deeper about how the OS actually works. The frustration is the point. Most developers never have to think about what the shell is actually doing between their keystrokes and the kernel.
Not sure it tells all that much about 'how the OS works'. This is a historical abstraction that happened to look how it looks today with all its numerous warts and shortcomings.
We can easily imagine it done a better way - for all the criticism of Windows, PowerShell gives a glimpse into this hypothetical future.
Fascinating that you resurrected an account from 2014 just for LLM spam, were the credentials compromised or something?
Somebody blamed this comment on LLMs, and maybe/probably it is, but I think the first sentence is spot-on so I thought it was worth replying to.
Dealing with the corner cases ends up teaching you a lot about a language and for an ancient language like the shell, dealing with the corner cases also takes you through the thinking process of the original authors and the constraints they were subject to. I found myself in this situation while writing EndBASIC and wrote an article with the surprises I encountered, because I found the journey fascinating: https://www.endbasic.dev/2023/01/endbasic-parsing-difficulti...