From 4bb3557b89f51c60736b80c7487e371448066693 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 1 Feb 2019 15:48:06 -0600 Subject: [PATCH] Update test.sh --- test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test.sh b/test.sh index 3b278ab..2adf0e4 100755 --- a/test.sh +++ b/test.sh @@ -20,10 +20,10 @@ fi while getopts ':a:b:c:r:' flag; do case "${flag}" in - r) $flag=$OPTARG; echo "R - $r" ;; - a) $flag=$OPTARG; echo "A - $a" ;; - b) $flag=$OPTARG; echo "B - $b" ;; - c) $flag=$OPTARG; echo "C - $c" ;; + r) r=$OPTARG; echo "R - $r" ;; + a) a=$OPTARG; echo "A - $a" ;; + b) a=$OPTARG; echo "B - $b" ;; + c) a=$OPTARG; echo "C - $c" ;; :) echo "Invalid option: $OPTARG requires an argument" 1>&2 ;; esac done