I'm working on a bash script and i need to implement "options". How can i do that with bash?
my goal is tu run script the following way:
/myscript.sh -d "/var/log/" -c "test"
what i've tried:
while shift; do
case $1 in
-d)
shift&&DIR="$1"||die
;;
-c)
shift&&COMMAND="$1"||die
;;
esac
done
echo "$DIR"
echo "$COMMAND"
