2020-09-19 20:19:57 +08:00

19 lines
273 B
Plaintext

snippet getopts "Deal with shell parameters" b
BOOL=false
VAVLUE=''
while getopts ":bv:" o; do
case "${o}" in
b)
BOOL=true
;;
v)
VALUE=${OPTARG}
;;
*)
echo "Usage: $1 [-b] [-v VALUE]"
return
;;
esac
done
endsnippet