On Wed, Feb 27, 2008 at 04:13:31PM -0600, Dan Armbrust wrote: > I'm trying to find a variable or a command that will tell me where the > currently executing script lives. > [snip] > > The best I have come up with so far is: > > PROG=`which $0` > PROGDIR=`dirname $PROG` > echo $PROGDIR > > But I'm not yet convinced that this will always work. Well, what happens if $SCRIPT is not in $PATH? 'which' won't find it.... Sorry, I don't have a good solution handy. florin -- Bruce Schneier expects the Spanish Inquisition. http://geekz.co.uk/schneierfacts/fact/163 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20080227/56d2d74d/attachment.pgp