09-24-07 06:26 PM
On Mon, 24 Sep 2007 15:11:51 +0200, Martin Krischik
<krischik@users.sourceforge.net> wrote:
>
>
> Hello.
>
> currently use the following code to get the full path of the currently
> running script:
>
> pushd "$(dirname ${0})";
> typeset -r My_Dir=$(pwd);
> popd;
>
> But somehow I think there must be a better way. So is there?
>
> Martin
I think the better way in Unix is not to make your script depend on
knowing its own location, but some ideas on this topic were discussed
recently in this newsgroup.
--
Romance, like alcohol, should be enjoyed, but should not be allowed to
become necessary.
-- Edgar Friedenberg
[ Post a follow-up to this message ]
|