From 70704f01c7c75c99817227c0acc33c007c2f775e Mon Sep 17 00:00:00 2001 From: david Date: Thu, 14 Mar 2013 16:37:05 +0100 Subject: [PATCH] added option handler draft --- option_handler.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 option_handler.sh diff --git a/option_handler.sh b/option_handler.sh new file mode 100755 index 0000000..7250611 --- /dev/null +++ b/option_handler.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# shell option handler + +version="0.1" +author="david@socialnerds.org" + + +while getopts c:s:vh options +do + case "$options" in + c) + echo "configfile = $OPTARG";; + s) + echo "sourcefile = $OPTARG";; + v) + echo "version message";; + h) + echo "help message";; + ?) + echo "questionmark";; + *) + echo "nothing";; + esac +done +