On Sun, Nov 02, 2003 at 08:40:54PM +0200, [EMAIL PROTECTED] wrote:
> Muli Ben-Yehuda wrote:
> >untested, but should work, modulu error handling: 
> >
> >APP=`which app`
> >DIR=`dirname $APP`
> >cd $DIR && echo $DIR && $APP
> >
> >etc 
> 
> I thoough the standard way to get APP in the context of the snippet
> above is to use $0, which as far as I remember is what Sun's java
> startup scripts use (no immediate access to verify).

$0 is equivalent to argv[0] in C, IIRC. I was aiming for something
more generic, i.e. 

$ run-in-app-dir some_app 
or 
$ run-my-app-in-app-dir

Where the right thing to use would be $1 or APP=..., respectively. 

Cheers, 
Muli 
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://www.livejournal.com/~mulix

"the nucleus of linux oscillates my world" - [EMAIL PROTECTED]

Attachment: signature.asc
Description: Digital signature

Reply via email to