4 ms·
"The shell can be a disproportionately powerful programming environment." Then how do you explain why other languages are so much more popular? Not only that,
by yp_maplist 13y ago
"The shell can be a disproportionately powerful programming environment."
Then how do you explain why other languages are so much more popular?
Not only that, but how do you explain why the market for software developers compensates those with experience in these other languages more than those few developers who are highly competent in writing portable shell scripts?
Relative to what I have seen written by other developers, I consider myself a competent shell user.
Practice helps. On average I write or revise more than one new script per day.
And I've been doing this for years. The number of shell scripts I have written numbers in the thousands.
Is there a place where shell scripting is valued on par with the trendy languages like Python, Ruby, etc.?
- pjc50 13y agoPower is ill-defined and not related to popularity, which is in turn only lightly linked to market value. (Arguably the most powerful language by weight is APL, which has a tiny but dedicated community) Shell is very good at a narrow range of tasks involving text and file manipulation, but a couple of crippling limitations: whitespace in filenames (especially, god help you, newlines) destroys many casually written scripts, and the only structure really supported by the shell utils is newline-delimited.
- yp_maplist 12y agoI love APL! I am a student of k and now q. The biggest problem of the shell is the rules around quoting. That includes whitespace but also many other snafus. As for all the utilities being geared toward line-by-line (newline delimited), this is true. But quoting can be learnt with practice; I rarely have problems because it is second nature. And, there's a shell utility called lex. It lets you design your own utilities (filters). And you can create filters that read multiple lines, easy as pie. (Easier than mastering awk.) You can even create your own programming language by combining lex with another standard utility: yacc. This is how C was created. Do they still force CS students to learn about these utilities?