title: Why am I getting an error when I use `uname` in my .bashrc?
body: <p>In my .bashrc I have the following code</p>
  <pre><code>if [`uname` == &quot;Linux&quot;]; then
      echo &quot;It worked&quot;
  else
      echo &quot;It didn't work&quot;
  fi
  </code></pre>
  <p>But when I source my .bashrc I get the following results</p>
  <blockquote>
  <p>[Linux: command not found</p>
  <p>It didn't work</p>
  </blockquote>
  <p>Strangly, the <code>[</code> is not a typo, it is part of the error. If I comment out the if-statement, then the error goes away, so I am pretty sure that it is the source of the error. Plus, if I change the <code>Linux</code> to <code>linux</code>, then the error changes to lowercase also.</p>
  <p>And if I echo uname I get Linux.</p>
  <p>To source my .bashrc I have used <code>source .bashrc</code> and also have started a new bash session by typing <code>bash</code> on the command line terminal.</p>
  <p>I didn't think it was that hard to check for the OS type, but I can't seem to figure out the correct syntax for the .bashrc.</p>
  <p>I don't see what I am doing wrong, can anyone help?</p>