[MKSearch-dev] Getting directory location of a running script
(was:Week 4 round up)
Bruno Postle
bruno at mkdoc.com
Fri Nov 12 12:06:10 GMT 2004
On Fri 12-Nov-2004 at 11:39 -0000, Phil Shaw wrote:
>
> One limitation is that the client scripts call a
> ./test-environment.sh reference, which means the user has to be
> working in the relevant directory. I have had a skim around the Web
> and couldn't find any examples of how to get the location of the
> primary script rather than the user (pwd).
You could retrieve it with `dirname $0` (if you have dirname on your
system).
..or you could add the tools/ directory to $PATH.
--
Bruno
More information about the MKSearch-dev
mailing list