System administration - best scripting language to start out with?
Hi,
This is a question to Linux system administrators from an aspiring sysadmin currently preparing for formal training in the field. My question pertains to scripting languages. I'm mainly focusing on improving my Bash skills and the training will also involve PowerShell since it doesn't focus exclusively on Linux. They don't teach any of the "Big Three" - Python, Perl, and Ruby - which is why I'm thinking of learning one of them on my own. I've dabbled with all three. That said, I'm a bit confused as to what scripting language other than Bash would make the best choice. Job vacancies for junior Linux system administrators usually mention the "Big Three" (apart from the ubiquitous Bash, of course) but rarely require knowledge of a specific scripting language. They simply either demand or prefer that you be familiar with at least one of the Big Three. Which leads me to wonder which of those, in 2018, may be the best choice. I've dabbled with all three. I like Ruby and Perl most, although Python comes up somewhat more often than Perl or Ruby. I've been looking around online for answers but most discussions I find on the topic are dated. Having said that, would it be worthwhile starting to learn one of them on my own or would it be wiser to just focus on mastering Bash and waiting until I actually start out working in the field to learn a scripting language based on what's needed on the job? Thanks! |
Quote:
After that learn AWK. If you have some programming background you can pick up AWK in an afternoon of concentrated study. Then a few more and you'll be comfortable. Ruby is not relevant to system administration, but perl5 is. That will take some time to be comfortable with. It's main strength is text manipulation and pattern matching. It's good for rapid prototyping but also apparently actually fast at run time. There are an increasing number of anecdotes surfacing of perl re-implementations of C applications being faster, at least in the area of text processing. Logs are text. |
Agree - shell/awk/perl
|
Quote:
If it takes you 10 minutes in bash, and an hour in python, then python isn't what you should use. Another admin may be reversed...start with what you know, and build on it. |
Quote:
|
Quote:
|
Quote:
|
This type of question in an international Internet-Forum, presented to the mixed audience that we are, does not make much sense, I am afraid.
I feel good, using my languages. So, mine must be the best, which is basically the same as any other kind of response that you can get. Choose for an audience the guys and gals, that you have to respond to, in your job and whatever kind of clientele might have to take a look at your code, once in a while. They know the BEST of all answers EVER! |
When working in bash, it's definitely good to be able to use one-liner (simple) awk or sed tricks; makes extracting info easier.
See google for many many examples. For deeper stuff, python or perl is traditional. I haven't seen it done in ruby but some people may. As above, use whichever you feel confortable with. FWIW, the extensive Perl docs/books do include Perl book for SysAdmins http://shop.oreilly.com/product/9781565926097.do There are many other useful links on google, as Larry Wall (the inventor of Perl) invented it originally for Sysadmin work & it's been around for many years. Stick to v5.x https://perldoc.perl.org/ |
Hi guys,
Thanks a lot for sharing your thoughts and advice! Much appreciated. I've been reading up on AWK and it sure looks worthwhile learning at least the basics. I did come across AWK in other discussions but never took the time to look into it. When it comes to the "Big Three", I think I'll go for Perl. It seems to make sense for an absolute beginner as myself and I've dabbled with it more than with the other two. And as someone who appreciates flexibility, I also rather like its motto "There's more than one way to do it" as opposed to that of Python. But that's just my personal preference. That said, I do agree with Michael that it's all pretty relative and what matters is getting the job done. At least, that's how I interpreted it. I just needed some pointers to help me decide and that's what I got. Thanks again! |
If I suggested one in would be Perl. You can make system scripts or websites with it. See OTRS helpdesk system, written in Perl. As far as job market I think it has the most potential as well. Currently anyway.
|
Quote:
|
All times are GMT -5. The time now is 03:02 PM. |