title: pwd command with shell script
body: <p>I am calling a script as below </p>
  
  <hr>
  
  <p>directory path  : /user/local/script/print_path.sh</p>
  
  <pre><code>var_path=`pwd`
  echo $var_path
  </code></pre>
  
  <p>The above script is calling as below 
  directory path  : /user/local/callPscript/call.sh</p>
  
  <pre><code>`/user/local/script/print_path.sh`
  </code></pre>
  
  <hr>
  
  <p>I want the out put as below : </p>
  
  <pre><code>/user/local/script/
  </code></pre>
  
  <p>But it gives the output :</p>
  
  <pre><code>/user/local/callPscript/
  </code></pre>
  
  <hr>
  
  <p>i.e. the pocation of the script is called. How can I make it to the scripts home directory path?</p>