[SOLVED] How to decide when to use what scripting language
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everyone!
As a Linux newbie I've had some experience with 2 scripting languages so far, namely BASH and Python.
I would like to know which one you would recommend (and why). I think this must depend on what I will be doing - 75% sysadmin jobs and 25% web development.
Thanks in advance!
I'd recommend Python for anything working with files of data. It's got great regexp support and it's file reading functions are very straightforward. I understand Python works great with the web as well.
For anything involving other programs on the system, pipes, etc. BASH is usually better. You could always do an os.system() to get similar functionality in Python though.
I think it ultimately depends on what you're more comfortable with. For the web stuff, Python is definitely the way to go though.
But yea Python is what I use for most everything. I use bash for quick jobs or quick script of a sys admin task that I want to automate but thats about it.
Assuming you know the languages well, then it should usually be fairly obvious which one is most appropriate for the job at hand.
If you can't easily decide which one would better suit a particular job, then it likely doesn't matter very much, and you should be able to simply pick whichever one you prefer working in.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.