In a bash script, I can use $0 for the current "path/name" of the
script. Can I get just the path of the script? Is there a quick way to
strip off the script name for example?

When echo $0 gives:
   /foo/bar/my-script
I need "/foo/bar" or "/foo/bar/"

With a smile I tried $-1 and did actually get some output:
hB1

Is that a meaningful value about something or random memory contents
relayed by underlying pointer arithmetic in bash???

echo $-2 gives hB2 and $-3 hB3.

My shell gives somewhat different values than the script: himBH1 himBH2 himBH3

I'm using bash 2.05b.0(1)-release on Mac OS X.


-Chuck

--
[EMAIL PROTECTED]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to