1basename(1B)       SunOS/BSD Compatibility Package Commands       basename(1B)
2
3
4

NAME

6       basename - display portions of pathnames
7

SYNOPSIS

9       /usr/ucb/basename string [suffix]
10
11

DESCRIPTION

13       The  basename  utility deletes any prefix ending in `/' and the suffix,
14       if present in string. It directs the result to the standard output, and
15       is  normally  used  inside substitution marks (` `) within shell proce‐
16       dures. The suffix is a string with no special significance attached  to
17       any of the characters it contains.
18

EXAMPLES

20       Example 1 Using the basename command.
21
22
23       This  shell procedure invoked with the argument /usr/src/bin/cat.c com‐
24       piles the named file and moves the output to cat in the current  direc‐
25       tory:
26
27
28         example% cc $1
29         example% mv a.out `basename $1 .c`
30
31
32

ATTRIBUTES

34       See attributes(5) for descriptions of the following attributes:
35
36
37
38
39       ┌─────────────────────────────┬─────────────────────────────┐
40       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
41       ├─────────────────────────────┼─────────────────────────────┤
42       │Availability                 │SUNWscpu                     │
43       └─────────────────────────────┴─────────────────────────────┘
44

SEE ALSO

46       sh(1), attributes(5)
47
48
49
50SunOS 5.11                        28 Mar 1995                     basename(1B)
Impressum