File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / man / man1 / basename.1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

.TH BASENAME 1 "1 April 1981"
.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.