Python surpasses Perl in popularity?
grahn+nntp at snipabacken.se
Fri Dec 5 13:10:52 CET 2008
["Followup-To:" header set to comp.unix.shell.]
On 29 Nov 2008 16:23:49 GMT, Tam Ha <not-for-mail at sonic.net> wrote:
> Jorgen Grahn <grahn+nntp at snipabacken.se> wrote:
>>(I could get away with using Bash in these cases. It has functions,
>>local variables and so on. Writing portable Bourne shell is not as
> Can you explain this?
Sorry for the late answer. No, it's actually what I said:
I could get away with using bash in these cases, so I did it. It was
an in-house application, it had already unknown dependencies to bash,
and to Linux versions of other utilities. If I had asked for time to
modify it to make sure it was portable Bourne shell, people would have
laughed at me.
> Bourne is always more portable than Bash.
> That's why you'll find experienced shell programmers writing everything
> that doesn't absolutely require a bash feature in /bin/sh. Boot scripts,
> install scripts, etc. should never be written in bash and if where you
> find one using bash you can be sure a Linux-only newbie has written it.
Sure, nothing controversial about that. I don't argue that people
should use bash features in any random script they write. I just noted
that if you decide to use it, it's a pretty useful language. Probably
more useful than Python in my case, where most of the work was about
starting and managing external commands and pipelines.
> For one there are too many versions of bash, for two it is not installed
> by default on every Unix/Linux OS, for three it has poor backwards
> (and forwards) compatibility.
Worse compatibility than Perl or Python? The Bourne shell timescale
is probably impressive, but often you aren't interested in decades.
> It is also found at different places on
> the path.
Surely that applies to almost any interpreter, like perl and python.
It's a problem (on the non-free Unixes at least) but if you let it be
the deciding factor, you could use no scripting language except
/bin/sh and awk.
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!
More information about the Python-list