|
|
1.1 root 1: .\" @(#)basename.1 6.1 (Berkeley) 4/29/85
2: .\"
3: .TH BASENAME 1 "April 29, 1985"
4: .AT 3
5: .SH NAME
6: basename \- strip filename affixes
7: .SH SYNOPSIS
8: .B basename
9: string [ suffix ]
10: .SH DESCRIPTION
11: .I Basename
12: deletes any prefix ending in `/' and the
13: .I suffix,
14: if present in
15: .I string,
16: from
17: .I string,
18: and prints the result on the standard output.
19: It is normally used inside substitution marks \`\ \`
20: in shell procedures.
21: .PP
22: This shell procedure invoked with the argument
23: .I /usr/src/bin/cat.c
24: compiles the named file and moves the output to
25: .I cat
26: in the current directory:
27: .IP "" 15n
28: cc $1
29: .br
30: mv a.out \`basename $1 .c\`
31: .SH "SEE ALSO"
32: sh(1)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.