Archive for the 'Uncategorized' Category

Bash: Command line parser for Multiple arguments to bash

Tuesday, July 20th, 2010

I regularly have to write scripts into different environments and when I am wrapping a build system, I typically use a Bash script to do it. I often have to pass a set of arguments to the underlying commands in my scripts as well. I have found that the %* argument is the easiest way to take those arguments.

The %* takes the arguements and passes them along. The %1, %2, %3…and so on are the individual arguments but unless you have a fixed amount of arguments, then you will need to process a variable amount of arguments.

while [ $#  -gt 1 ]
do
  case "$1" in
    -a)
      ANALYZE=1
      ;;
    *)
     echo "Invalid option"
     ;;
   esac
   shift
done

Welcome to eTechTips

Wednesday, May 27th, 2009

Say goodbye to the bouncing ball!

As this site has been close to 10 years in the making, it is time to say goodbye to the basic flash animation that I started with on the main page.

So feel free to ask questions or give me suggestions for topics.

Welcome To eTechtips – Day One

Tuesday, May 26th, 2009

Welcome to day one of the revamped eTechtips informational blog.

Please feel free to request information about any topics that interest you.