ddiirrnnaammee -- Command

Extract a directory name
ddiirrnnaammee _s_t_r_i_n_g

The command ddiirrnnaammee extracts a directory name from a file's full path name.
In effect, it is the complement of the command bbaasseennaammee.

If _s_t_r_i_n_g contains  one or more slashes `/' plus  text, then ddiirrnnaammee prints
out the  portion of _s_t_r_i_n_g up  to (but not including)  the last slash.  For
example, if _s_t_r_i_n_g points to /bbiinn/sshh, then ddiirrnnaammee will return /bbiinn.

If  _s_t_r_i_n_g does not  contain a  slash or  is empty (that  is points  to the
current directory),  ddiirrnnaammee prints a  single period `.'.   For example, if
_s_t_r_i_n_g points to mmyypprrooggrraamm, then ddiirrnnaammee returns a period.

Finally, if _s_t_r_i_n_g consists only of  one slash (that is, indicates the root
directory), then ddiirrnnaammee returns /.

_S_e_e _A_l_s_o
bbaasseennaammee, ccoommmmaannddss, ccuutt, ppaassttee
