Monday, July 25, 2011

5 important things to follow to become good in shell scripting



       Everybody wants solutions to their problems, and more importantly,  we are now expected to get it faster. One can give faster solutions in Unix when one has a good grip on the command line options, and more importantly scripting languages. There are quite a few of them present: Basic Shell scripting, perl scripting, python, ruby, etc. Though our title reads to become good in shell scripting, we in general are going to discuss how to become good in automating things? Or the kind of outlook one needs to have to go in that direction?

    How can one become good in automation? Is it just books one has to read and master or something more? Let us see in this article 5 different traits if one has can turn things around:

 1. Be lazy: The most important trait of all is, to be lazy, to be absolutely lazy. Please don't read between the lines. Being lazy means to show laziness to do the same things repetitively.  The more lazy you are, the more you start disliking tasks of such nature which demand you to grind the same stuff day-in and day-out.  Gradually, you start thinking towards a solution which will get the job done easily, which will achieve the same result with lesser effort which in turn will lead you to automation.  Keep in mind, the world tomorrow is for those who do things better and more importantly, faster.

2. Learn scripting languages: One can give many tips to follow to evince interest in automation, however at the end of the day, it is the individual's choice to show interest in what he or she is doing. We need to be very interested in making things simpler, which makes our life comfortable. Once you start showing interest, you will start doing all the right things such as learning different automation stuffs in UNIX like basic shell scripting, sed, awk, perl, python, ruby,etc. Once you have learnt a scripting language, look out for some potential things or tasks in your project which can be automated. Once you automate something, you will understand the real joy and power behind automation.

3. Pay attention to the smallest of things: An employee's mantra should always be: Make life simple for others.When you are in an organization, you might be in an environment where you will find quite a few things which can be automated. In this case, you have lot of scope for automation. However, it is also possible where you find everything has been automated already in your project, nothing else left or no scope for any more automation. I personally do not accept the fact that there is no scope for automation in any project. The thing you should keep in mind is: Be aware and pay fullest attention to the smallest of things. There are many many things which without realizing we keep doing again and again. Even though it is small, if automated will lead to a considerable time saving. The point I am trying to make is: You need not sit and think what can I automate in my work place. Just pay attention to your day to day activities, you will get hundreds of places where you can automate.

4. Participate in forums: Say, you learnt some scripting language, say shell scripting or perl scripting. If you are working in an environment where you get work on scripting on a regular basis, no issues. However, this may not be the case everywhere or for everybody. Sometimes, you may get a scripting task once in a blue moon, and by the time the next task comes, we have forgotten what we learnt. Due to this, we are in need wherein we need to be continuously in touch with what we have learnt. And the best way to do this is by participating in forums. Everyday, one should spend atleast half-an-hour in a forum. For Unix people, I will always prefer unix.com . 

   Participating in forums is not just to remain in touch.  Keep in mind, for every problem, there is more than one way of solving it. The real meaning of this statement you will realize when you participate in any forum. Even for some simplest of problems, you will see most beautiful solutions. And when you see a particular problem being approached in many different ways, your thinking towards a problem starts differing, starts getting multiple options. Also, the kind of learning which will happen here is something which you may not come across in any text book.

5. Develop a never repeating mindset: Tell yourself you will never do the same thing again. If you are doing the same thing again and again,  something is going wrong. Once you develop a mindset of this nature, you will automatically be more inclined towards automation or scripting. Think of ways which will minimize the effort, reduce the time needed to perform it. Any time you get something which you had done before, ask yourself one question: "How can I do it better than last time?". Next time, when you get it again, ask yourself: "What can I do so that I need not repeat the whole thing again next time?"

Happy Automating!!!
Related Posts Plugin for WordPress, Blogger...

1 comment: