title: Match string to multiple globs in Bash
body: <p>I'm trying to simplify my Bash 4 script. I'm reading lines from a file and I want to exclude lines matching certain substrings:</p>
  
  <pre><code>while read p; do
      if [[ $p != *-ext ]]; then
          if [[ $p != *-backend ]]; then
                  if [[ $p != *-vip ]]; then
                      echo $p
                  fi
              fi
          fi
      fi
  done &lt; $hostsfile
  </code></pre>
  
  <p>So if the line does NOT end with -ext or -backend or -vip then print it. What's an easier way (one-liner that doesn't chain &amp;&amp;'s) to accomplish this?</p>