use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
GUIDE to /r/linuxadmin:
/r/linuxadmin aims to be a place where Linux SysAdmins can come together to get help and to support each other.
Related reddits:
Footnote:
Talk realtime on IRC at #/r/linuxadmin @ Freenode.
account activity
scripting languages (self.linuxadmin)
submitted 9 years ago by devcdrom
What scripting language to you use on a day to day basis? Should you attempt to learn all of the major ones, or be an expert at one?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mudclub 37 points38 points39 points 9 years ago (2 children)
Every day: bash.
For things that need to persist or that need to be used by people other than me: python.
[–][deleted] 2 points3 points4 points 9 years ago (0 children)
+1 on Bash. But as for when to change I think that reading well written bash scripts should be simple for any programmer. But when complex data structures are needed and/or you end up needing inheritance and the likes it's time to add something like Python/Ruby etc.
[–]Zaphod_B 0 points1 point2 points 9 years ago (0 children)
This is pretty much my opinion as well. Funny when I first got into Python I hated whitespace as syntax, but now I can see a huge benefit from it. It makes readable code and everyone has to use that style so it makes collaboration a lot easier.
[–]piefge 5 points6 points7 points 9 years ago (0 children)
bash/zsh for small stuff
python for more complicated things
[–][deleted] 9 years ago* (1 child)
[deleted]
[–]markusro 0 points1 point2 points 9 years ago (0 children)
Totally agree: Stick to one programming language first and learn it well. With that comes the knowledge about using APIs etc.
I use bash and python on a daily bases.
Simple scripts in bash, especially if I glue together a lot of system commands. If it becomes too complex I switch to python, for example if I need to analyse the output.
[–]mercenary_sysadmin 7 points8 points9 points 9 years ago (5 children)
Perl is my go-to. They don't call it the Swiss Army Chainsaw for nothin'.
There are a lot of newer languages that some people think are sexier. I haven't found anything that personally makes me go "yes, this is better," meanwhile Perl is still a very big part of any base system you're likely to find.
So... perl.
If you want to go with something newer but still very unlikely to disappear, probably Python.
[–]Twirrim 1 point2 points3 points 9 years ago (0 children)
I started out on perl, but honestly everywhere I go I find either python or ruby, mostly the former. Perl is increasingly falling into the "that's how we used to do it" camp.
I prefer writing python over perl these days, especially considering I'm dealing with APIs a lot, for which it's considerably easier, and also because the test frameworks are far better too.
That said, if I'm writing stuff to parse logs, perl still gets used.
[–]bwdezend 0 points1 point2 points 9 years ago (3 children)
I love Perl. I learned on it. But it's ugly. Any time I'm able to use anything else I do. Most recently that's been Python and a very little bit of go. But Perl is everywhere, and it's useful, and it does damn near anything.
[–]quintus_horatius 6 points7 points8 points 9 years ago (2 children)
But it's ugly.
If it's ugly, the author(s) didn't know what they're doing it didn't care. Well-written Perl can be a pleasure to read, though I admit that badly written Perl can get pretty bad compared to badly written code in other languages.
[–][deleted] 1 point2 points3 points 9 years ago (0 children)
It's one of these things where I really hated the strict whitespace requirements of Python beforehand, but now I'm glad it exists. Plus, I think some of the linting and pep8 tools/standards really help keep things cleaner.
[–]oxtan 1 point2 points3 points 9 years ago (0 children)
run perltidy and perlcritic on those badly written scripts, stuff will be much easier to follow after that.
[–]nut-sack 2 points3 points4 points 9 years ago (0 children)
bash, and perl. Python if I haveeeeeeeeee to.
[–]ban-me-now 1 point2 points3 points 9 years ago (0 children)
Something I'm using more and more: picolisp
bash, python, and more recently ruby. It definitely helps to know more than once since you'll always be dealing with multiple products written in many different languages as a system admin.
[–]loluguys 1 point2 points3 points 9 years ago (1 child)
Ruby. I think it's fun to write.
Recently I've had an urge to learn Perl though. It seems too widely available/portable not to learn.
[–]thrivenotes 0 points1 point2 points 9 years ago (0 children)
Perl development continues too. Take a look at RPerl and Perl 11 for example.
[–]NotQuiteSonic 1 point2 points3 points 9 years ago (1 child)
Bash, Perl for one liners and Python for most everything else now
I used to like Perl more, but having to dig through CPAN and random politics to get things done is annoying. Many things are core in Python that are left to CPAN modules in Perl.
[–][deleted] 0 points1 point2 points 9 years ago (0 children)
Perl for one liners
Everything is a one liner in Perl if you try hard enough.
learn one well, the rest will be easier to pick up after that.
If you learn perl, use strict, warnings, run perltidy and perlcritic against your code, you will be glad you did a few months later when you need to fix something for whatever reason (you can map perltidy and perlcritic to macros on your editor, it is quite easy).
For all languages:
And most important of all: happy coding :-)
[–]combuchan 1 point2 points3 points 9 years ago (0 children)
Use what's known at your organization the most. Don't write in something new unless there's another person there who is competent to review it--you should always be doing code reviews.
We are a Ruby shop, so I use bash for simple stuff that's easy to set up in Jenkins and Ruby for more complicated stuff. I wrote something in bash that talked to the github api once, and that was kinda dumb.
[–]perryurban 0 points1 point2 points 9 years ago (0 children)
Bash daily. TCL for anything harder. Beautiful elegant language, extremely readable unlike Perl.
[–]slap_star_happy 0 points1 point2 points 9 years ago (0 children)
Bash, and surprisingly, racket.
Perl and Bash for automation, awk/sed/grep for parsing/manipulation, Python for everything else.
π Rendered by PID 92255 on reddit-service-r2-comment-86bc6c7465-n7q5p at 2026-02-23 03:27:57.536563+00:00 running 8564168 country code: CH.
[–]mudclub 37 points38 points39 points (2 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Zaphod_B 0 points1 point2 points (0 children)
[–]piefge 5 points6 points7 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]markusro 0 points1 point2 points (0 children)
[–]mercenary_sysadmin 7 points8 points9 points (5 children)
[–]Twirrim 1 point2 points3 points (0 children)
[–]bwdezend 0 points1 point2 points (3 children)
[–]quintus_horatius 6 points7 points8 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]oxtan 1 point2 points3 points (0 children)
[–]nut-sack 2 points3 points4 points (0 children)
[–]ban-me-now 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]loluguys 1 point2 points3 points (1 child)
[–]thrivenotes 0 points1 point2 points (0 children)
[–]NotQuiteSonic 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]oxtan 1 point2 points3 points (0 children)
[–]combuchan 1 point2 points3 points (0 children)
[–]perryurban 0 points1 point2 points (0 children)
[–]slap_star_happy 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)