Re: bash vs. python scripts - which one is better?
On Sat, Aug 18, 2007 at 08:52:45PM +0200, Manon Metten wrote:
>
> Thanks for sharing your valuable experience. I've decided to first become
> more familiar with Bash and then I'll give Python a try. If it don't like
> it, I
> can always try something else. But ATM I think Python will be the best
> option. I've seen some code on the net that looks pretty clean and some
> examples that enable me to achieve what I want.
I think you've hit the nail on the head. While the coding of both bash
and pyhthon _can_ be made clear, bash allows some cryptic short-cuts
that are rather common whereas python enforces clean coding. Also, I
find that some of the bash constructs are cryptic by their nature with
no clean work-arounds. They are likely perfectly clear to a proficient
bash coder but the finer points are lost on me.
In short, I use bash for things like dos .bat files; a sequential list
of commands. Once something requires looping or decisions, I go
straight for python. To complete the sequence, if python is too slow at
something, I recode the relevant functions in Fortran. I did that a lot
on my 486 but never on my Athlon64. :)
Doug
Reply to: