On Wed, 23 Mar 2005 09:08:01 -0700, Byron Clark <[EMAIL PROTECTED]> wrote:
> On Wed, 23 Mar 2005 09:01:32 -0700, Michael Moore <[EMAIL PROTECTED]> wrote:
> > I've got a shell script, and need to get the location of the folder
> > from where the script was run.
> > $0 gets me the path including the file name of the script.
> >
> > echo $0 gives:
> >  /Volumes/UNTITLED/DSL/dsl-OSX.command
> >
> > I need:
> > /Volumes/UNTITLED/DSL/
> 
> 'dirname $0' should do what you want.
> 

Awesome. Works as advertized.

-- 
Michael Moore <-- Vote for me for webmaster!
-------------------------------
www.stuporglue.com

--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to