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.

--------------------
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