Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ basename(1) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)



     basename(1)                DG/UX 4.30                 basename(1)



     NAME
          basename, dirname - deliver portions of path names

     SYNOPSIS
          basename string [ suffix ]
          dirname string

     DESCRIPTION
          Basename deletes any prefix ending in / and the suffix (if
          present in string) from string, and prints the result on the
          standard output.  It is normally used inside substitution
          marks ("") within shell procedures.

          Dirname delivers all but the last level of the path name in
          string.

     EXAMPLES
          $ basename /usr/user1/a.b.c

          a.b.c

          The above example stripped the directory that a.b.c is
          located in and printed only the filename.

          $ dirname /usr/user1/a.b.c

          /usr/user1

          The above example stripped the filename "a.b.c" and printed
          only the directory name.

     SEE ALSO
          sh(1).

     BUGS
          The basename of / returns /.



















     Licensed material--property of copyright holder(s)         Page 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026