[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash vs. python scripts - which one is better?



Hi David,

On 8/7/07, David Brodbeck <brodbd@u.washington.edu> wrote:

> I'm about to learn bash or python scripting.
> - Which one is easiest to learn?

That's debatable, I think.  Bash's syntax is more idiosyncratic, but
there's less of it.

> - Which one is more powerful?

Python.
 

> Or should I learn bash scripting anyway?

If you plan to do much system administration, learning bash scripting
is worthwhile.  There are three reasons I can think of right off the
bat:
- Every Unix-like system you encounter will have some version of the
Bourne shell. Not every system will have Python.
- You will often need to modify or maintain other people's bash
scripts, since that's how most startup scripts and the like are written.
- Simple bash scripts can be done right from the shell prompt, which
is sometimes handy.


I wish I'd discovers Linux some ten years ago. I have literally hundreds of
AmigaDOS and ARexx scripts - some of them very powerful - that don't
even come close to converting to bash (or maybe python). Now I feel I've
to re-invent the wheel.

Thanks for your input, Manon.


Reply to: