Posted by: Eric Hansen
when relevant content is
added and updated.
There’s a plethora of scripting languages available…Shell, Perl, Python and Ruby to name a few. While I’ve used all but one of those (Ruby), I’ve always wondered to myself what makes me use one over another.
Shell I use for when I want something quick and dirty and easy access to the OS. Instead of having to build loops in Python to browse through a directory recursively, I just have to do a simple for loop in Shell. It also allows for retrieval of certain data without requiring extra libraries or modules (next best thing in both these cases would be Perl).
Next there is Perl, which comes standard on most Linux distros. It used to be the de-facto scripting language next to Shell (and really seemed to surpass it). I never used it much to be honest, as the language was far too different for me compared to what I used to at the time (C & C++ mostly) and I was in high school as well. From what I’ve seen of it though it has a similar structure of Python where it has its core functionality then everything else is a module. While this isn’t horrible, it can drag development.
Python, which I have only used for about 2 years now, has become my go-to scripting language for these needs. It offers a lot of power and ease of use without sacrificing much. The only issue really is that its based on indentation (which is why I use Sublime Text Editor). While a lot of things can be done via modules, you can also write your own methods which can be more efficient.