-
-
Save asvid/d2882cdd9cbc9860ef7f327a4e777b99 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| OTHER_ARGUMENTS=() | |
| ARG_A=false | |
| for arg in "$@" | |
| do | |
| case $arg in | |
| -h) | |
| Help | |
| exit;; | |
| -a) | |
| ARG_A=true | |
| shift;; | |
| -p|--path) | |
| ARG_PATH=$2 | |
| shift | |
| shift | |
| ;; | |
| *) | |
| OTHER_ARGUMENTS+=("$1") | |
| shift;; | |
| esac | |
| done | |
| echo -e "${ARG_A}" | |
| echo -e "${ARG_PATH}" | |
| echo -e "${OTHER_ARGUMENTS[*]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment