AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
f) .. .... ._ __ . ·
BASE NAME ( 1 ) BASE NAME ( 1 ) NAME basename, dirname - deliver portions of path names SYNOPSIS basename string [ suffix ] dirname string DESCRIPTION Basename deletes any prefix ending in I and the suffix (if present in string ) from string, and prints the result on the standard output. It is normally used inside substitution marks ( ' ' ) within shell procedures. Dirname delivers all but the last level of the path name in string . EXAMPLES The following example, invoked with the I usr I srcl cmdl cat.c, compiles the named file and output to a file named cat in the current directory: cc $1 argument moves the mv a.out 'basename $1 .c' The following example will set the shell variable NAME to lusrlsrclcmd: NAME= 'dirname /usr/src/cmd/cat.c' SEE ALSO sh( 1). BUGS The basename of I is null and is considered an error. - 1 -
- Page 145 and 146: abort: generate an semaphore set or
- Page 147 and 148: passwd: change login password. sett
- Page 149 and 150: operations. msgctl: message control
- Page 151 and 152: split: split a file into channel. t
- Page 153 and 154: generate e program cross reference.
- Page 155 and 156: stream. setbuf: assign buffering to
- Page 157 and 158: � Permuted Index /strcmp, strncmp
- Page 159 and 160: tsort: topologica.l sort. • . .
- Page 161 and 162: display editor based on/ vi, view:
- Page 163: INTRO ( 1) INTRO ( l ) NAME intro -
- Page 166 and 167: 300 ( 1 ) 300 ( 1 ) for C programs,
- Page 168 and 169: \�
- Page 170 and 171: I I I I I I I I I I I I I I I I I I
- Page 172 and 173: ADB ( 1 ) ADB (l) sr, and usp. symb
- Page 174 and 175: ADB ( 1} ADB (l} " ••• " 0 Pr
- Page 176 and 177: ADB ( 1) ADDRESSES b d e m 8 t The
- Page 178 and 179: ADMIN ( 1) -t[name] -fflag b ADMIN(
- Page 180 and 181: ADMIN(l) ADMIN(l) make deltas (chan
- Page 182 and 183: ( � � . · � .
- Page 184 and 185: AR(l) AR (I) X Extract the named fi
- Page 186 and 187: AS (l) (AT&T UNIX PC Only ) AS (I)
- Page 188 and 189: ·� · ·. rl · (1
- Page 191 and 192: AWK (l) AWK (l) NAME awk - pattern
- Page 193: AWK (l) AWK(l) Add up first column,
- Page 198 and 199: I� �� I J
- Page 200 and 201: BC(l) BC (l) l(x) log a(x) arctange
- Page 203 and 204: BDIFF(l) BDIFF ( 1 ) NAME bdiff - b
- Page 205 and 206: BFS (I) BFS(I) NAME bfs - big file
- Page 207 and 208: BFS (l) BFS (l) could be used to ma
- Page 209: CAL ( 1) CAL(l) NAME cal - print ca
- Page 212 and 213: ' ..
- Page 215 and 216: ;� CC ( l ) cc (1) NAME cc - C co
- Page 217: CC(l) /lib/crts.o /lib/mcrto.o /lib
- Page 221 and 222: CDC ( 1 ) CDC { 1) NAME cdc - chang
- Page 223: CDC (l) CDC (l) SEE ALSO admin( l),
- Page 226 and 227: CFLOW ( 1) CFLOW ( 1) produces the
- Page 228 and 229: CFONT(l) (AT&T UNIX PC only ) CFONT
- Page 231: CHOWN (l) CHOWN ( 1) NAME chown, ch
- Page 234 and 235: .'�
- Page 236 and 237: I I I I I I I I I I I I I I I I I I
- Page 238 and 239: COL(l) COL(l) BUGS Cannot back up m
- Page 240 and 241: COMB(l) COMB(l) FIT..ES s.COMB The
- Page 243 and 244: CP ( 1) CP ( 1) NAME cp, In, mv - c
- Page 245 and 246: CPIO ( 1 ) CPIO ( 1) NAME cpio - co
BASE NAME ( 1 ) BASE NAME ( 1 )<br />
NAME<br />
basename, dirname - deliver portions of path names<br />
SYNOPSIS<br />
basename string [ suffix ]<br />
dirname string<br />
DESCRIPTION<br />
Basename deletes any prefix ending in I and the suffix (if present<br />
in string ) from string, and prints the result on the standard output.<br />
It is normally used inside substitution marks ( ' ' ) within<br />
shell procedures.<br />
Dirname delivers all but the last level of the path name in string .<br />
EXAMPLES<br />
The following example, invoked with the<br />
I usr I srcl cmdl cat.c, compiles the named file and<br />
output to a file named cat in the current directory:<br />
cc $1<br />
argument<br />
moves the<br />
mv a.out 'basename $1 .c'<br />
The following example will set the shell variable NAME to<br />
lusrlsrclcmd:<br />
NAME= 'dirname /usr/src/cmd/cat.c'<br />
SEE ALSO<br />
sh( 1).<br />
BUGS<br />
The basename of I is null and is considered an error.<br />
- 1 -