DIRNAME(1) COMMAND REFERENCE DIRNAME(1)
NAME
dirname - deliver directory portion of path name
SYNOPSIS
dirname path
DESCRIPTION
Dirname delivers all but the last level of the path name in
path.
EXAMPLES
The following example will set the shell variable NAME to
the name of the directory which contains the command `sh'.
NAME=`dirname \`pathof sh\``
Note the use of pathof to get the full pathname of the
command, and the use of escaped backquotes to allow two
levels of command substitution.
CAVEATS
The dirname of a file name with no slashes is considered to
be `.'. For example,
dirname foo
prints `.'.
SEE ALSO
basename(1), pathof(1), sh(1sh).
Printed 10/17/86 1
%%index%%
na:72,84;
sy:156,126;
de:282,205;
ex:487,461;
ca:948,229;
se:1177,148;
%%index%%000000000104