Bash for Programmers

Again I am going to write about the Bash scripting. As I have mentoioned in my last post Bash was serving programmers from decades and many programmers are die hard Bash scriptors. The main reason behind is Bash providing a good support to make their lives easier.

Lets see few things that Bash can do for you.

For an instance imagine that you are to organize your folder. You saved your PHP code files in “.php” extension and the Team Leader is requesting those in “.do” extension now. The folder has around 100 PHP files. Imagine how cumbersome. Being frank even thinking doing manually, make me lunatic.

But for Bash lovers this is not a big deal at all. Write a script may be it will cost you around 5 mins and run it. That is all about it.

Again for an instance, every code file includes an header describing what it does and so on. In this example the second line of the header bears a value which is specific to that file and it describes a value (eg: //no_of_hrs=38 ).  However your team leader needs to know the total value of the 2nd line of the header. Imagine there are more than 100 files. Again for Bash lover this will cost around 5 minutes. You can use a Bash script and a small C program to get the total with in moderately 10 mins of work.

Due to above advantages many programmers tend to use Bash scripting every day not only of their jobs but also in their real live situations.

One of my cousins, a photographer who have a digital camera faced following problem. She needs to group photos according to the date the photo was taken. She was running it as a batch therefore she wasted more hours by organizing those according to the date. The digital camera has a feature, so that it is possible to set the date and time of the photo was taken, as the file name of the photo. I introduced her Fedora and wrote a little Bash script, what it does is depending on the file name it creates a folder with the date and put all the photos which were taken on that day to that folder. She was delighted and die hard fan of Linux now.

Those are the facts that shows how Bash scripting is important. It could save time for you. Therefore as programmers learning Bash scripting is vital and you can use it for you life to fulfill the needs.



Please add your valuable idea below, will make a discussion, thanks !

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s