Open muxator opened 7 years ago
With this change jvmtop.sh can be symlinked in a directory in the PATH and called from anywhere.
jvmtop.sh
PATH
$ ls -l /usr/local/bin/jvmtop.sh lrwxrwxrwx 1 root root 32 Dec 13 21:46 /usr/local/bin/jvmtop.sh -> /opt/jvmtop with space/jvmtop.sh
Before the change:
$ jvmtop.sh Error: Could not find or load main class com.jvmtop.JvmTop
After the change it works, even if the script is a symlink, and if spaces are contained in the path.
Source for the change: http://stackoverflow.com/questions/59895/getting-the-current-present-working-directory-of-a-bash-script-from-within-the-s#comment54598418_246128
With this change
jvmtop.sh
can be symlinked in a directory in thePATH
and called from anywhere.Before the change:
After the change it works, even if the script is a symlink, and if spaces are contained in the path.
Source for the change: http://stackoverflow.com/questions/59895/getting-the-current-present-working-directory-of-a-bash-script-from-within-the-s#comment54598418_246128