title: How can I get the path to the currently running shell script (cshell linux)
body: <p>Linux/CSHELL:   </p>
  
  <p>How can I get the path to a tcsh script that is being sourced?<br>
  This is not $PWD.  Rather, the path to the script (file).</p>
  
  <p>Versions/specifics:  </p>
  
  <p>% echo $SHELL $PLATFORM<br>
  /tool/pandora/bin/tcsh linux_3.10.0_64<br>
  ls -l /tool/pandora/bin/tcsh<br>
  lrwxrwxrwx 1 pandora pandora 33 Oct 20  2016 /tool/pandora/bin/tcsh -> ../.package/tcsh-6.19.00/bin/tcsh</p>
  
  <p>There are lots of notes in here for this type of thing.  But I didn't see one for linux c-shell.</p>
  
  <p>Thanks in Advance !</p>
  
  <p>Example:</p>
  
  <p>I have a file /home/myid/my_cshell.csh...</p>
  
  <pre><code>set a = `readlink -f ${0}`
  echo $a
  echo ${0}
  
  source /home/myid/my_cshell.csh
  /tool/pandora/.package/tcsh-6.19.00/bin/tcsh
  /tool/pandora/bin/tcsh
  </code></pre>
  
  <p>This is giving me the path to tcsh, not /home/myid/my_cshell.csh</p>
  
  <p>The script above works fine if I tcsh it, but not source it.
  I need the path to the file being sourced.</p>