Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ basename(1) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                              basename(1)



        _________________________________________________________________
        basename, dirname                                         Command
        deliver portions of path names
        _________________________________________________________________


        SYNTAX

        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 /.




        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)



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