Use the command "pwd".
On Sun, Jul 21, 2013 at 4:16 PM, Michael <[email protected]> wrote: > I feel silly for asking this. But I just realized I don't try this very > often. > > Is there a way for a shell script to find itself? Or more precisely, the > directory it is in? > > I am trying to run a program that wants an ini file specified on the > command line; but it defaults to the assumption of having its config file > in /etc unless you tell it where it is. And rather than a one-line script > that hard codes a directory, I'd rather that it (the script) can tell where > it is located, to use an ini file there. > > (Yea, a one-line script to just pass a config file argument to a program.) > > --- > This message was composed with the aid of a laptop cat, and no mouse > > _______________________________________________ > MacOSX-talk mailing list > [email protected] > http://www.omnigroup.com/mailman/listinfo/macosx-talk > -- Best Regards, John Musbach
_______________________________________________ MacOSX-talk mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/macosx-talk
