title: Using wildcard inside case statement in bash
body: <p>I'm making a simple bash script. It accepts 2 options (-d and -f). I would like to allow also the long version of this options (-directory and -file). I tried using the curly brackets wildcard but it doesn't work. Any suggestions?</p>
  
  <p>Thanks!</p>
  
  <pre><code>#!/bin/bash
  
  while test $# != 0
  do
    case $1 in
    -f)
      # do something
      ;;
    {-d,-directory})
      # do something
      ;;
    *)
      echo "error"
      ;;
    esac
    shift
  done
  </code></pre>