9070 Remove wanboot from gate
[unleashed.git] / usr / src / man / man1b / basename.1b
bloba3f07d5e151c9595318214477059ffb987e9e977
1 '\" te
2 .\"  Copyright (c) 1995, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH BASENAME 1B "Mar 28, 1995"
7 .SH NAME
8 basename \- display portions of pathnames
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/ucb/basename\fR \fIstring\fR [\fIsuffix\fR]
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBbasename\fR utility deletes any prefix ending in `\fB/\fR' and the
19 \fIsuffix\fR, if present in \fIstring\fR. It directs the result to the standard
20 output, and is normally used inside substitution marks (\fB` `\fR) within shell
21 procedures. The \fIsuffix\fR is a string with no special significance attached
22 to any of the characters it contains.
23 .SH EXAMPLES
24 .LP
25 \fBExample 1 \fRUsing the \fBbasename\fR command.
26 .sp
27 .LP
28 This shell procedure invoked with the argument \fB/usr/src/bin/cat.c\fR
29 compiles the named file and moves the output to \fBcat\fR in the current
30 directory:
32 .sp
33 .in +2
34 .nf
35 example% \fBcc $1\fR
36 example% \fBmv a.out `basename $1 .c`\fR
37 .fi
38 .in -2
39 .sp
41 .SH SEE ALSO
42 .sp
43 .LP
44 \fBsh\fR(1), \fBattributes\fR(5)