We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54bb512 commit c5a7b03Copy full SHA for c5a7b03
1 file changed
getopts.sh
@@ -0,0 +1,20 @@
1
+#!/bin/bash
2
+#Purpose: Getopts Examples working with arguments
3
+#Version:1.0
4
+#Created Date: Wed May 30 22:30:51 IST 2018
5
+#Modified Date:
6
+#WebSite: https://arkit.co.in
7
+#Author: Ankam Ravi Kumar
8
+# START #
9
+
10
+while getopts :a:b: options; do
11
+ case $options in
12
+ a) ap=$OPTARG;;
13
+ b) bo=$OPTARG;;
14
+ ?) echo "I Dont know What is $OPTARG is"
15
+ esac
16
+done
17
18
+echo "Option A = $ap and Option B = $bo"
19
20
+# END #
0 commit comments