|
|
Subscribe / Log in / New account

Evolution of shells in Linux (developerWorks)

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 10:24 UTC (Fri) by nicku (guest, #777)
In reply to: Evolution of shells in Linux (developerWorks) by HelloWorld
Parent article: Evolution of shells in Linux (developerWorks)

> That is exactly the reason why many programs interpret "--" as "end of switches, rest is arguments."
I know, but nobody ever thinks of using that in practice, making it useless in practice.
I don't understand why you say this. I and my workmates use this whenever required.


to post comments

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 10:29 UTC (Fri) by HelloWorld (guest, #56129) [Link] (5 responses)

> I don't understand why you say this.
Because that's the way that it is.

> I and my workmates use this whenever required.
Then you're obviously more attentive than the average shell programmer.

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 10:33 UTC (Fri) by dlang (guest, #313) [Link]

how large a study did you make to define that the 'average shell programmer' doesn't know this?

and how do you define 'shell programmer'

I would say that people who are making their living on a team working with the shell (sysadmin types) have a pretty good chance of knowing this, but people who are tinkering and learning alone are less likely to have learned this, but such people are far more likely to have gaps of all kinds in their knowledge.

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 12:10 UTC (Fri) by mpr22 (subscriber, #60784) [Link] (3 responses)

I think it's safe to say that for any widely-used programming language, there is a sizeable group you can more or less reasonably describe as being "average $LANGUAGE programmers" who are not very good at adhering to best practice. So, saying "the average $LANGUAGE programmer doesn't do $BEST_PRACTICE_ITEM" seems likely to be true, obvious, and unenlightening.

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 12:32 UTC (Fri) by HelloWorld (guest, #56129) [Link] (2 responses)

The question is what consequences to draw from it. And the answer is obvious: solve the problem some other way so that the best practice isn't needed any longer. What this boils down to is that shell programming should be avoided wherever possible.

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 13:06 UTC (Fri) by dlang (guest, #313) [Link] (1 responses)

by that logic, no languange should ever be used for programming

people keep trying to produce things that can be extended to do things that weren't initially programmed in via config files of various kinds, but evenutally every one of these config files grows into (or adopts) some sort of programming language.

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 13:23 UTC (Fri) by HelloWorld (guest, #56129) [Link]

> by that logic, no languange should ever be used for programming
Well, this is not a binary thing. The thing is that in order to write reliable shell scripts, you need to jump through hoops *all the time* (i. e. every time you use a glob, every time you use sed in a locale other than the one you have tested your script with etc.) in order to stop bad things from happening.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds