Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ basename.bsd(1) — Domain/IX SR9.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

BASENAME(1)

NAME

basename − strip filename affixes

USAGE

basename string [ suffix ]

DESCRIPTION

Basename deletes any prefix ending in a slash (/) and the suffix, if present in string, from string.  It then prints the result on the standard output.  Basename is normally used inside substitution marks (` `) in Shell procedures. 

EXAMPLE

This Shell procedure, invoked with the /usr/src/bin/cat.c argument, compiles the named file and moves the output to cat (1) in the current directory:

cc $1
mv a.out `basename $1 .c`

RELATED INFORMATION

sh (1). 

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