Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. __FILE__
  2.  
  3. ...
  4. rootdir=`/bin/dirname $0` # may be relative path
  5. rootdir=`cd $rootdir && pwd` # ensure absolute path
  6. zero=$rootdir/`/bin/basename $0`
  7. echo $zero
  8. ...
  9.  
  10. #!/bin/tcsh
  11. echo "I am $0."
  12.  
  13. set rootdir = `dirname $0`
  14. set abs_rootdir = `cd $rootdir && pwd`
  15. echo $abs_rootdir
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement