Create getopts.sh

This commit is contained in:
Ankam Ravi Kumar
2018-06-16 17:48:07 +05:30
committed by GitHub
parent 54bb512314
commit c5a7b03ff3

20
getopts.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
#Purpose: Getopts Examples working with arguments
#Version:1.0
#Created Date: Wed May 30 22:30:51 IST 2018
#Modified Date:
#WebSite: https://arkit.co.in
#Author: Ankam Ravi Kumar
# START #
while getopts :a:b: options; do
case $options in
a) ap=$OPTARG;;
b) bo=$OPTARG;;
?) echo "I Dont know What is $OPTARG is"
esac
done
echo "Option A = $ap and Option B = $bo"
# END #