Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ basename(1) — sys5 — Apollo Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)



BASENAME(1)              DOMAIN/IX SYS5               BASENAME(1)



NAME
     basename, dirname - deliver portions of pathnames

USAGE
     basename string [ suffix ]
     dirname string

DESCRIPTION
     Basename deletes from string any prefix ending with a slash
     (/), as well as any suffix present.  It then prints the
     result on the standard output.  Basename is normally used
     inside substitution marks (``) within shell procedures.

     Dirname delivers all but the last level of the pathname in
     string.

EXAMPLES
     To remove a specified suffix of c from the prog.c string,
     and produce prog as the resulting output, type the follow-
     ing:

          basename prog.c .c


     To set the Shell variable NAME to /usr/cmd, specify this:

          NAME= `dirname /usr/cmd/cat.c`

CAUTIONS
     The basename of / is null and considered an error.

RELATED INFORMATION
     sh(1).




















Printed 12/4/86                                        BASENAME-1





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