Hi all,
I am trying to use long arguments for my existing script. right now my script would work if given <script_name> -t <arg1> -b <arg2> -v <arg3>. The script code is shown below.
while getopts t:v:b: OPT;do
case "$OPT" in
t) Todo=$OPTARG;;
b) Batch=$OPTARG;;
v) version=$OPTARG;;
*) Usage;;
esac
done
Is it possible to achieve the code below using getopts?? I have tried several times and was unsuccessful.
<script_name> -todo <argument1> -batch <argument2> -version <argument3>