title: Test for a dot in bash
body: <p>How can I test if some string is dot in bash? I've tried this:</p>
  
  <pre><code>if [ "$var" = "." ]
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>if [ "$var" = "\." ]
  </code></pre>
  
  <p>But it doesn't work.</p>