Skip to content

Instantly share code, notes, and snippets.

@Hiestaa
Created July 4, 2019 19:17
Show Gist options
  • Save Hiestaa/6060ada2200a4592674a0e42b121d0ed to your computer and use it in GitHub Desktop.
Save Hiestaa/6060ada2200a4592674a0e42b121d0ed to your computer and use it in GitHub Desktop.
#!/bin/bash
for i in "$@"
do
case $i in
-p=*|--password=*)
PASSWORD="${i#*=}"
;;
-s=*|--servername=*)
SERVERNAME="${i#*=}"
;;
-l=*|--lib=*)
DIR="${i#*=}"
;;
--default)
DEFAULT=YES
;;
*)
# unknown option
;;
esac
done
echo PREFIX = ${PREFIX}
echo SEARCH PATH = ${SEARCHPATH}
echo DIRS = ${DIR}
echo DEFAULT = ${DEFAULT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment