title: How to check if PATH already contains a particular directory
body: <p>I want to be able to reload a users .profile so that it "permanently" updates the PATH without having to restart the system. This is what I'm doing within the .profile file and it's not working.</p>
  
  <pre><code>if [[$PATH != "*path_to_directory*"]];then
       PATH=&lt;path_to_directory&gt;:$PATH
  fi
  </code></pre>
  
  <p>After I save that addition to the .profile, i run source .profile to reload it, but I just get an error and my PATH isn't updated.</p>