On 4/14/07, Chuck Esterbrook <[EMAIL PROTECTED]> wrote:
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/"


You can use the dirname command to get the directory and the basename
command to get the command.

-- Rick

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

Reply via email to