bashify.com
  • Home
    • Why bash?
    • Which version?
    • About me
  • Useful Techniques
  • Function Libraries
  • Scripts & Tools
  • Cool Tools
Sitemap
Print Version
Last update:
July 27. 2010 16:04:09
Login

Why bash?

When it comes to linux system administration, I use bash for just about everything. That includes lot of things for which other tools might be better suited. I'll make no apologies. I use bash until I can't use bash. (Note that when I say bash, I don't mean bash alone, but bash in conjunction with awk, sed, grep, tr, expect and the host of external commands available in most *nix environments.)

There are two things I learned, way back in the day, when I was working construction:

  1. Sometimes the tool you know is better than some other tool you don't, even if the other tool is technically the correct or preferred tool.

    For example, my grandfather was a wiz with an old fashioned square. He could layout rafters and make stair cuts like nobody's business. Me? I learned using a speed square, which has all the markings and angles already figured out. I couldn't use a plain old square anywhere near as well as he could, and he was lost when looking at all those markings on a speed square. However, both of use could accomplish the same results with what the other believed was the "wrong" or "inferior" tool.

     
  2. The tool in your hand can often be used to get the job done much more quickly than stopping and going in search of a better or more correct tool.

    When I was a carpenter I always had two hammers with me, a 16 oz curved claw for lighter jobs and a 24 oz straight claw for quickly driving 16d nails when framing. What I never had with me was a pry bar or a sledge hammer. Inevitably I would come across something that needed torn down, though, so rather than stop and go find the "right" tools I would put my two hammers to use. The straight claw and long handle of my framing hammer served well in place of a pry bar, and its heavier weight was usually enough to substitute for a 5 lb sledge.

I've found programming to be similar. There are better tools than bash for many tasks, but I've found that sticking with my familiar tool saves me time and still gets the job done most of the time. I know it, and I know how to leverage it, and that saves me time. The end result may not execute as quickly as some other solution, but I find that is rarely a problem. In the rare event bash isn't fast enough, then I'll use something else, or if it turns out bash just isn't powerful enough, then I'll switch to something else. Most of the time, though, for what I do at least, I find bash in conjunction with the awk/sed/grep external tools to be more than up to the task.

In my world, bash is the glue that binds everything together. At least with Unix and Linux systems. On Windows systems, Take Command is my preferred tool.

 

<
TOP
>
Copyright © 2008 bashify.com — Powered by cmsimple.dk and cmsimple-styles.com