#!/bin/bash goal="true|yes" before="" prefix="" decimals=2 while [ `echo $1 | grep "-"` ]; do case $1 in -d|--decimals) decimals=$2;; -b|--before) before=$2;; -p|--prefix) prefix=$2;; -g|--goal) goal=$2;; *) blabln "'"$1"' unknown\n usage abcd [options]"; return 1;; esac shift 2 done [ -n "$before" ] && printf $before abcdgc Prefix="$prefix" Decimals="$decimals" True="$goal" -