Let's say I have a script at /usr/bin/foo which is really just a link to /usr/local/blah/bin/foo
When I type "foo" at the command prompt (say bash), I would like the foo script to know where it's really homed at. However, "dirname $0" in that script will give "/usr/bin" instead of "/usr/local/blah/bin". Is there a way for a script to find out where it's really located? I suppose if foo doesn't find its associated files, it could look at itself ($0) for the link. What would be the best way to parse it out in a bash script? Any tips are appreciated, -Chuck -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
