bash script, (idiot-level!)

Hi guys I have a little script which would be very useful to me, there seems however to be an error in the last line. I am 100% non-expert when it comes to scripting/programming, the sight of a curly bracket {what* are* they called?} makes my head swim!!!

Anyhoo the problem is here:

71 cd $DIR
72 script_path=$(dirname "${0}")
73 "$script_path"/jre/bin/java -cp pokerclient.jar:resources.jar:ext-resources.jar ui.PokerClientApp

The script returns: line 73: ./jre/bin/java: No such file or directory

$DIR is defined earlier in the script, but this, line 72 is the first mention of dirname. line 73: ./jre/bin/java: No such file or directory

You must install or write this line in this directory.

ps, if I manually cd to to $DIR and then issue line 73, replacing $script_path with the actual path to the jre, (ie. like this on my machine-)
***stephen@linux-p9sz:***cd ~/bin/Devilfish/SKINS/devilfish
stephen@linux-p9sz:~/bin/Devilfish/SKINS/devilfish> ~/bin/Devilfish/jre/bin/java -cp pokerclient.jar:resources.jar:ext-resources.jar ui.PokerClientApp

…then the app launches as expected. As I say I have no knowledge of programming/scripting, and am groping in the dark, but this surely means that the problem is in line 72?

Sorry Stamostolias, but your reply means even less to me than does "script_path=$(dirname “${0}”) !! :slight_smile:

Hash: SHA1

what is the output of the script if you put echo “$script_path” on the
line 73? it would be ~/bin/Devilfish/ but on the error is .


Microsoft Windows is like air conditioning
Stops working when you open a window.
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE -


VampirD Thank-you for the reply, I have been busy and not had time to try the script with your suggestions, I have it working, by telling it where to look explicitly, I will try to look in to it further as soon as I can…