Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-12-2005, 11:00 AM   #1
LQ Newbie
Registered: Nov 2004
Distribution: Scientific Linux 6.4
Posts: 22

Rep: Reputation: 0
bash, perl, or python?

Hello all,
I am planning on spending some time on learning a language to use for simple tasks. I have written shell scripts that save certain settings files to specified directories, scripts that synchronize directories between pc's, shell scripts for latex docs, such as for word counts, scripts that rename files, etc.....
I have found that as time passes, I am writing more and more complicated scripts, and I am wondering if I should be spending my time learning python or perl rather than bash. As I am a mechanical engineer, I cannot afford the time to learn all three languages and then decide which one is best for my every day tasks.

My question is on which scripting language do you think is best for every-day linux administration tasks (like the ones stated above)? or even what do you think the strengths of bash, perl, and python are? (looked on the internet but couldn't find a comparison of these scripting languages)

Old 05-12-2005, 11:37 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 261Reputation: 261Reputation: 261
My vote would be to learn perl, well known, lots of support.. etc. More powerful than bash but bash is perfect for the small simple tasks, if your scripts are getting more complicated, use perl.
Old 05-12-2005, 11:40 AM   #3
LQ Newbie
Registered: Nov 2004
Posts: 11

Rep: Reputation: 0
I couldn't find much comparisons with bash...but I did find plenty of perl/python stuff.
This seems like a good run down.

Last edited by Leldorion; 05-12-2005 at 11:42 AM.
Old 05-12-2005, 04:57 PM   #4
LQ Guru
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Python can be used for small task and tasks as complex for gui programs writing. Python is a good language that starts you off to use other programming langauges. Though, it could not hurt to learn Perl.
Old 05-13-2005, 03:50 AM   #5
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
Ya, stay with learning Perl and Bash........

there is no real use for python in the Real world...
Old 05-13-2005, 04:14 AM   #6
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Originally posted by freakyg
Ya, stay with learning Perl and Bash........

there is no real use for python in the Real world...
Heh, with the risk of starting a Holy War I would like to say the opposite. Perl is very useful but it's a pain to use IMHO. Python allows for quickly writing advanced programs and it is easy to understand a program somebody else has written. Perl is known for allowing pretty much anything so everyone has their very own style, making maintaining an application someone else has written (in Perl) a huge pain.

It all comes down to preference though. Have a look at both Perl and Python and see which one suites you best. And knowing both doesn't hurt either.

Old 05-13-2005, 04:54 AM   #7
LQ Newbie
Registered: Nov 2004
Distribution: Scientific Linux 6.4
Posts: 22

Original Poster
Rep: Reputation: 0
thanks for your replies.
I actually should've mentioned that I do know how to get around C and FORTRAN (along with OpenMP and MPI API's for parallel processing) but only for numerical computations.
I do appreciate the comments like"knowing both is better", but you have to consider than I am not a computer scientist or working in a related are, as (I assume) most of you are. And for this reason I simply do not have the spare time to devote time in both. I am just looking for a language for every-day scripts, without being very limiting should I wish to do something more complicated (but again, only for every-day administration of my box).

Old 05-13-2005, 05:42 AM   #8
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,641

Rep: Reputation: 3536Reputation: 3536Reputation: 3536Reputation: 3536Reputation: 3536Reputation: 3536Reputation: 3536Reputation: 3536Reputation: 3536Reputation: 3536Reputation: 3536
Originally posted by freakyg
Ya, stay with learning Perl and Bash........

there is no real use for python in the Real world...
Say what ???.
I went through all this not so long back.
Python did all I could ask, and more - still learning.

Hey freakyg, go have a look at
This site is powered by Python (via planetplanet)
Ahhhh, you've goota love these type of thread - they always degenerate into "religious wars" amongst the various believers...

s_siouris, just spend a little time checking each out, then bite the bullet, and pick one.
Then stick with it - really you can't go wrong if you put the time in to learn it, rather than chopping and changing.

Last edited by syg00; 05-13-2005 at 05:47 AM.
Old 05-13-2005, 05:43 AM   #9
Senior Member
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

sorry could no stand this statement...

Originally posted by freakyg
there is no real use for python in the Real world...
from portage introduction...
Portage is completely written in Python and Bash and therefore fully visible to the users as both are scripting languages.
we are talking about one of the best package management systems ever built...
now... what you call real world??

Old 05-13-2005, 08:51 AM   #10
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Originally posted by freakyg
Ya, stay with learning Perl and Bash........

there is no real use for python in the Real world...
Really? I think Google, Yahoo, and Industrial Light & Magic would disagree. Perhaps these companies exist in the "fake world".

Anyway, I think python is easier to learn then perl and more powerfull then bash. So my skewed suggestion is python.
Old 05-13-2005, 10:21 AM   #11
Registered: Apr 2004
Distribution: Slackware 11.0, Gentoo
Posts: 252

Rep: Reputation: 31
As you can probably tell, between python and perl it is a prefernence thing (for the most part). I know you don't have time to learn the both of them, but take a quick look at both of them and then you may be able to determine which one will suffice. You defenitely came to the right spot as there are many opinions being thrown around.
Also, check out what kind of support each has, (web sites, forums, etc). That may help you make up your mind.
Old 05-13-2005, 03:15 PM   #12
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
My 2 cents:

I started programming just a couple years ago, and like you I started with BASH and soon wanted more power...

I had a look at both python and perl. Today I am quite productive with python, as it is very easy to learn and has a very easy to understand syntax. Perl however, still manages to baffle and confuse the hell out of me when even attempting the simplest of tasks.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Advice on PERL vs. Python servnov Programming 5 10-02-2005 02:59 PM
Python or Perl? Boby Programming 2 06-12-2005 10:54 AM
Perl or Python JJX Programming 6 10-27-2004 03:58 AM
Perl or Python ! linuxlover1 Programming 13 04-19-2004 07:33 AM
Perl or Python to C++ compiler JHuizingh Programming 0 07-16-2002 11:36 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration