Unix Shell - Re: Running a script: How to reference the directory the script is located in.

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > October 2006 > Re: Running a script: How to reference the directory the script is located in.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Running a script: How to reference the directory the script is located in.
jhagge@gmail.com

2006-10-24, 7:17 pm

> dir=$(cd "$(dirname "$0")"; pwd)

That did the trick! Thanks Daniel, you rock.

Thanks to everyone else who chimed in as well, it has been a good
learning experience for me. I am currently reading up on shar files.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com