File:  [CSRG BSD Unix] / 43BSDTahoe / man / man1 / basename.1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

.\"	@(#)basename.1	6.1 (Berkeley) 4/29/85
.\"
.TH BASENAME 1 "April 29, 1985"
.AT 3
.SH NAME
basename \- strip filename affixes
.SH SYNOPSIS
.B basename
string [ suffix ]
.SH DESCRIPTION
.I Basename
deletes any prefix ending in `/' and the
.I suffix,
if present in
.I string,
from
.I string,
and prints the result on the standard output.
It is normally used inside substitution marks \`\ \`
in shell procedures.
.PP
This shell procedure invoked with the argument
.I /usr/src/bin/cat.c
compiles the named file and moves the output to
.I cat
in the current directory:
.IP "" 15n
cc $1
.br
mv a.out \`basename $1 .c\`
.SH "SEE ALSO"
sh(1)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.