Every sysadmin needs a scripting language that goes beyond bash.
True bash is a main stay and needs to be in everyone’s tool box but for more feature rich scripting you should have a higher level language available to you.
When I started working in this field my choices were python or perl. I decided on perl because many tools that sysadmin’s use are written in perl (nagios), also there was a perl course available at my local night school and not for python.
10 years later I figured its time to learn a new language for a couple of reasons.
1. Many new sysadmin tools are being written languages other than perl
2. I’m bored of perl
3. Want to challenge myself
I decided on the 3 languages because their use is wide spread, well supported by the community and all have frameworks for web based apps.
Java, Ruby & Python.
I began by doing the hello world for all three. Right away I noticed in java you have way more typing to do before and after your code.
Void public static main????
No thanks. That left me with python and ruby. The hello world examples were straight up so I decided to try a while loop. I wanted my while loop to print “Hello world” ten times. This didn’t work for me in python; I needed to end the while line with a “:”, but with ruby it just worked!!!
start = 1
finish = 10
while start <= finish
puts “hello world”
start = start + 1
end
Amazing, a while loop with no syntax at all, it just works like the way you think it would.