title: If string contains in case statement
body: <p>I'm looking to provide a case statement based on whether a substring is within a filename.</p>
  
  <h1>Example Input</h1>
  
  <p>mysql_dumps/tpmysqldump-tps_dev_russell_development-information_schema-2014-03-26.sql</p>
  
  <h1>Code</h1>
  
  <pre><code>    case $DUMPFILE in
           *"tpdata"*)
               database="tpdata";;
           *"tpmrbs"*)
               database="tpmrbs";;
           *"information_schema"*)
               database="information_schema";;
           *"performance_schema"*)
               database="performance_schema";;
           *)
               echo "INVALID FILE";;
      esac
  </code></pre>