Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dirname(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

basename(1)

ed(1)

sh(1)

dirname(1)                                                       dirname(1)

NAME
     dirname - strip file name from full access path

SYNOPSIS
     dirname [--] string

DESCRIPTION
     dirname can eb used to strip the file name (basename) from the full
     access path. dirname takes a string as its argument, removes the final
     slash and all characters to the right of it, and writes the rest of
     the string on standard output. dirname is useful in shell scripts.

OPERANDS
     --   If string begins with a dash (-), the end of the command-line
          options must be marked with --.

     string
          string can be any string of characters.

          dirname deletes the final slash (and any slashes directly in
          front of it) and all characters to the right of it and writes the
          remaining portion to standard output. If string does not contain
          a slash, a dot is written to standard output.

LOCALE
     The LCMESSAGES environment variable governs the language in which
     message texts are displayed. If LCMESSAGES is undefined or is defined
     as the null string, it defaults to the value of LANG. If LANG is like-
     wise undefined or null, the system acts as if it were not internation-
     alized.

     The LCALL environment variable governs the entire locale. LCALL
     takes precedence over all the other environment variables which affect
     internationalization.

EXAMPLES
     In the following example, the path prefix /usr/src/cmd is assigned as
     a value to the NAME variable:

     NAME=`dirname /usr/src/cmd/xyz.c`

SEE ALSO
     basename(1), ed(1), sh(1).












Page 1                       Reliant UNIX 5.44                Printed 11/98

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