title: Command paths as variables in shell scripts
body: <p>What is the best practice when running external utilities in shell scripts. For example if I want to run 'gzip' in multiple scripts ensuring that a specific gzip binary is used should I make the full path to the binary a variable and just use the variable thoughout the script?</p>
  
  <pre><code>GZIP=/home/me/bin/gzip
  $GZIP somefile
  $GZIP anotherfile
  </code></pre>
  
  <p>Or is it better practice to hard code the path for each call to the binary?</p>
  
  <pre><code>/home/me/bin/gzip somefile
  /home/me/bin/gzip anotherfile
  </code></pre>
  
  <p>Or is it better to set and rely on the path?</p>
  
  <pre><code>PATH=/home/me/bin:$PATH
  gzip somefile
  gzip anotherfile
  </code></pre>
  
  <p>I'm not running the scripts as root therefore maintainability, and portability is more important than user security.</p>