On Thu, 2008-02-28 at 19:40 -0600, Mike Miller wrote:
> Thanks Brock! In other words, the problem with the script was that there
> was a single colon where it didn't belong. I've tested the following
> script and it seems that this will do what we want:
>
> case "$0" in
> */*) EXEC_DIR="${0%/*}" ;;
> *) EXEC_DIR="$PWD" ;;
> esac
>
> EXEC_DIR="$(builtin cd "$EXEC_DIR" && builtin echo "$PWD")"
> builtin echo "$EXEC_DIR"
I think we've shown through previous discussions of how $0 works that
the second option in that case statement would never get hit (meaning,
there's always a '/' in there somewhere)
Couldn't you take that down to
EXEC_DIR="$(builtin cd "${0%/*}" && builtin echo "$PWD")"
--
Mike Hicks <hick0088 at tc.umn.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20080228/245af775/attachment.pgp