3 ms·
>By this I mean that they seem to actively resist the idea that they need to learn the language to get the most out of it. That wouldn't be the case if shell w
by coldtea 4y ago
>By this I mean that they seem to actively resist the idea that they need to learn the language to get the most out of it.
That wouldn't be the case if shell was actively resistant to learning it.
First due to the varieties (different shells, POSIX vs additions, GNU vs UNIX/BSD versions, etc).
Second due to the huge non-consistency between app flags, switches, and other aspects, which are essential part of the shell experience. The whole set (POSIX command line userland + shell) was never designed as a coherent whole.
Third due to incredibly bad design of certain shell language aspects and historical cruft, that could very well be improved upon, but will never for compatibility reasons (or will, but in a new shell).
Add to that, that unlike "any other programming language" shell is mostly useful for quick one-offs and any of the myriads of syntax/gotcha/option you've learned from writing a quick command line or script you'll need to lookup time and again (because you've forgotten it after weeks or months later when you need it again).
- getoffmyyawn 4y agoFrom what I can see, everything you listed applies to most long lived programming languages. I can certainly say the same things about javascript and python. Your last paragraph really highlights it. Why take this approach? When I need to use something time and again, I take a little time to write a clean, clear, and robust shell script to automate that task. Instead of the one liner in my history, it will usually be around 20 lines in a file. A shell script should be written in a verbose manner and include in comments whatever notes and links to docs are useful. A good one will serve you well for a long time. I have some I'm still using unmodified for >20 years.
- coldtea 4y ago>From what I can see, everything you listed applies to most long lived programming languages. Yes, in the sense that both St. Louis, MI and Tokyo, Japan can be said to have crime.
- deleted 4y ago[deleted]