Something went wrong. Try again.
Shells in OCaml
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930i=0run () { while getopts ':a:l:v' opt; do case $opt in (v) verbose="on";; (a) article=$OPTARG;; (l) lang=$OPTARG;; (?) echo "hmmmmm:$OPTARG"; (:) # "optional arguments" (missing option-argument handling) case $OPTARG in (a) exit 1;; # error, according to our syntax (l) :;; # acceptable but does nothing esac;; esac i=$((i + 1))
if [ $i = 100 ]; then exit 100 fi done}
run -a article-is-this -l EN -v -v -v echo $OPTINDecho $verboseecho $articleecho $langecho $OPTARG