Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am migrating to Linux and have some experience with the Mac OS X command line/bash. I'd like to automate system admin tasks via scripting, but I am unsure as which language is the most used in the real world: bash shell scripting, Perl or Python ? Which should I learn (if more than one, what order) ?



share|improve this question

closed as not constructive by xenoterracide Nov 24 '10 at 1:39

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

the answer is 'yes', or it depends on what you're trying to do. If you know bash, and it will do what you're trying to do, use bash, same goes for other languages. posix shell is part of SUS. Perl is required too, python is not, thus Perl could be said to be more unix. –  xenoterracide Nov 24 '10 at 1:34
this kind of question would be closed on SO too... frankly it all comes down to use case an personal opinion these are all valid languages for most operating systems... you can even make bash work on windows. –  xenoterracide Nov 24 '10 at 1:40
@xenoterracide: I'd say the question is objective (you could make statistics) but argumentative (so I'm not objecting to the closing). Bash isn't in POSIX, nor is Perl. @Scott: regarding the different shell flavors, see unix.stackexchange.com/questions/3320. Perl is more common in the unix world, but Python is gaining market share. *sh and perl/python don't really compete for the same tasks: *sh is better at simple file and process manipulation (text also, with awk), p* are better at larger programs. –  Gilles Nov 24 '10 at 1:45
@Gilles but any statistics are likely to be somewhat flawed... how do you define used? and used for what? used as in executed? –  xenoterracide Nov 24 '10 at 1:56
I think this would be a great question if it was edited to ask for an explanation of the differences and some specific examples where it might be better to use one language over another. –  Robert S Ciaccio Nov 25 '10 at 19:54