title: How to handle shell getopts with parameter containing blank spaces
body: <p>I'm looking for a way to handle arguments containing blank spaces that has to be parsed 
  by shell getopts command.</p>
  
  <pre><code>while getopts ":a:i:o:e:v:u:" arg
    do
    echo "ARG is: $arg" &gt;&gt; /tmp/submit.log
    case "$arg" in
    a) arg1="$OPTARG" ;;
    i) arg2="$OPTARG" ;;
    o) arg3="$OPTARG" ;;
    ...
    u) argn="$OPTARG" ;;
    -) break ;;
    \?) ;;
    *) echo "unhandled option $arg" &gt;&gt; /tmp/submit.log ;;
    ?) echo $usage_string
       exit 1 ;;
    esac
  done
  </code></pre>
  
  <p>Now if -u has argument like "STRING WITH WHITE SPACE"
  than just the first part of the string is triggered and the while loop doesn't go to the end.</p>
  
  <p>many thanks.</p>