Re: working directory

From: Muli Ben-Yehuda (mulix_at_nonexisting.hamakor.org.il)
Date: Sun 02 Nov 2003 - 09:20:25 IST


On Sun, Nov 02, 2003 at 09:01:55AM +0200, Shai Bentin wrote:

> Here's the whole story. I have a java application which needs to start from
> the directory where it is as a working directory. The problem is that this
> application can be installed by the user anywhere on his system. So I need a
> way to start the application from the diectory it was saved in. In windows
> for example I can create a shortcut with a working directory, in Linux I
> don't know? One way is to use a script which I ask the user to set the
> working directory by him self. My question is if there are other ways to do
> it?

untested, but should work, modulu error handling:

APP=`which app`
DIR=`dirname $APP`
cd $DIR && echo $DIR && $APP

etc

-- 
Muli Ben-Yehuda
http://www.mulix.org | http://www.livejournal.com/~mulix
"the nucleus of linux oscillates my world" - gccbot@#offtopic

=================================================================
To unsubscribe, send mail to linux-il-request_at_linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request_at_linux.org.il




This archive was generated by hypermail 2.1.7 : Sun 02 Nov 2003 - 09:26:39 IST