Last active
August 25, 2021 14:02
-
-
Save sorquan/667b621709cc3158831a8eab6c9cdaa4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Getopts - parsing arguments | |
while getopts "hs:c:" opt; do | |
case $opt in | |
c) | |
echo "Argument $opt at position $OPTIND equals $OPTARG" | |
;; | |
s) | |
echo "Argument $opt at position $OPTIND equals $OPTARG" | |
;; | |
h) | |
echo -e "$helptext" | |
;; | |
*) | |
echo -e "$helptext" | |
;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment