> On 2016-05-12, at 15:38 , Yves Dorfsman <y...@zioup.com> wrote:
> 
> 
> A lot of people love to hate bash, and there are good reasons for it, but it
> seems that there isn’t an obvious replacement for it.

ksh93 is the obvious replacement.  I always felt that ksh was intended to be a 
scripting language, bash was intended to be an interactive language.  It’s just 
that over time, I found that ksh’s interactive capabilities pulled me in more.

> At some point it looked like perl was going to be it, then depending on the
> local preferences some shops use either python or ruby, heavy JVM shop often
> use groovy, while more and more shops now even use js or go...
> 
> I find bash (or any other UNIX shell) much more natural for simple scripts, I
> don't even mind all gotchas (set -e, super weak typing, every var is gobal,
> etc..), but do hate how bad it is to manipulate data, and the difficulty to
> organize code.

ksh has supported non-global vars for some time using typeset inside a function 
declaration (using a different function declaration syntax than used by old sh 
to avoid confusion).  Support for much more complex structures has been there 
for quite some years now, including a struct concept.  It also supports FPATH, 
so you can put your functions outside the original file for better organization 
of your code and even code reuse.  

Discipline functions give some interesting possibilities for data manipulation 
as well.

> What do *you* use? Do you see any clear winner to replace it on the horizon?

I see people so much rushing to the next new thing that a widely available tool 
that’s been stable for years isn’t even allowed to be reviewed, causing people 
to continue to suffer with the crappy tools.

Me?  I use ksh93 + awk.  Once I learned that combination, I found that it met 
almost all my standard needs.  


----
"The speed of communications is wondrous to behold. It is also true that 
speed can multiply the distribution of information that we know to be 
untrue." Edward R Murrow (1964)

Mark McCullough
mark.mc...@gmail.com




_______________________________________________
Tech mailing list
Tech@lists.lopsa.org
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to