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
KSH ( 1) KSH ( 1) The following exported aliases are compiled into the shell but can be unset or redefined: echo='print -' false= 'let 0' history='fc -1' integer= 'typeset -i' pwd= 'print - $PWD ' r='fc -e - ' true= 'let 1' type= 'whence -v ' hash='alias -t' Tilde Substitution. After alias substitution is performed, each word is checked to see if it begins with an unquoted -. If it does, then the word up to a / is checked to see if it matches a user name in the /etc/ passwd file. If a match is found, the - and the matched login name are replaced by the login directory of the matched user. This is called a tilde substitution. If no match is found, the original text is left unchanged. A - by itself, or in front of a /, is replaced by the value of the HOME parameter. A - followed by a + or - is replaced by the value of the parameter PWD and OLDPWD respectively. In addition, the value of each keyword parameter is checked to see if it begins with a - or if a - appears after a :. In either of these cases a tilde substitution is attempted. Command Substitution. l The standard output from a command enclosed in a pair of grave accents ( ") may be used as part or all of a word; trailing newlines are removed. The command substitution 'cat file' can be replaced by the equivalent but faster '
KSH ( 1 ) KSH(l) The value of a named parameter may also be assigned by writing: name= value [ name= value ] ••• If the integer attribute, -i, is set for name , the value is subject to arithmetic evaluation as described below. Positional parameters, parameters denoted by a number, may be assigned values with the set special command. Parameter $0 is set from argument zero when the Korn Shell is invoked. The character $ is used to introduce substitutable parameters . ${parameter} The value, if any, of the parameter is substituted. The braces are required when parameter is followed by a Jetter, digit, or underscore that is not to be interpreted as part of its name or when a named parameter is subscripted. If parameter is a digit then it is a positional parameter. If parameter is * or @, then all the positional parameters, starting with $1, are substituted (separated by spaces). If an array identifier with subscript * or @ is used, then the value for each of the elements is substituted (separated by spaces). ${#parameter} If parameter is not *, the length of the value of the parameter is substituted. Otherwise, the number of positional parameters is substituted. ${#identifier[*]} The number of elements in the array identifier is substituted. ${parameter:-word} If parameter is set and non-null then substitute its value; otherwise substitute word . ${parameter :=word} If parameter is not set or is null then set it to word; the value of the parameter is then substituted. Positional parameters may not be assigned to in this way. ${parameter:?word} If parameter is set and is non-null then substitute its value; otherwise, print word and exit from the shell. If word is omitted then a standard message is printed. ${parameter:+word} If parameter is set and is non-null then substitute word; otherwise substitute nothing. ${parameter# pattern } ${parameter## pattern } If the Korn Shell pattern matches the beginning of the value of parameter, then the value of this substitution is the value of the parameter with the matched portion deleted; otherwise the value of this parameter is substituted. - 5 -
- Page 316 and 317: � I )
- Page 318 and 319: EX (l) BUGS EX (l) The undo command
- Page 320 and 321: EXPR(l) EXPR ( l ) 3. 4. returns th
- Page 323 and 324: FC(l) ( AT&T UNIX PC only ) FC ( l
- Page 325: FILE ( 1 ) FIT..E ( 1 ) NAME file -
- Page 328 and 329: FIND ( 1 ) FIND ( 1 ) -print -cpio
- Page 330 and 331: GET(l) -b -ilist -xlist GET(l) furt
- Page 332 and 333: GET(l) GET(l) TABLE 1. Determinatio
- Page 334 and 335: GET(l) GET(l) generated by the get.
- Page 337 and 338: GETOPT ( 1) GETOPT ( l ) NAME getop
- Page 339: GREEK (l) GREEK(l) NAME greek - sel
- Page 342 and 343: GREP ( 1) GREP (1) The order of pre
- Page 344 and 345: � '--- I I I I I I f)
- Page 346 and 347: · r1 . .... .. ._ _ . . r1 ' ·
- Page 348 and 349: HP(l) HP (1) is adjacent to an ASCl
- Page 351: ID ( 1 ) ID ( 1) NAME id - print us
- Page 355 and 356: IPCS ( 1) IPCS ( 1) NAME ipcs - rep
- Page 357 and 358: IPCS ( 1 ) OWNER GROUP CREATOR CGRO
- Page 359 and 360: JOIN ( 1 ) JOIN ( 1 ) NAME join - r
- Page 361: KILL (I) KILL(l) NAME kill - termin
- Page 364 and 365: KSH(l) KSH ( 1) A command is either
- Page 368 and 369: KSH ( 1) KSH ( 1) ${parameter%patte
- Page 370 and 371: KSH ( 1) KSH(l) with the parameter
- Page 372 and 373: KSH ( 1) KSH(l) redirected using a
- Page 374 and 375: KSH ( 1) KSH(l) variables whose sco
- Page 376 and 377: KSH ( 1 ) KSH(l) Command Re-entry.
- Page 378 and 379: KSH(l) KSH(l) using paper terminals
- Page 380 and 381: KSH ( 1) KSH ( 1) [count]Tc Equival
- Page 382 and 383: KSH ( 1) KSH(I) Line feed and print
- Page 384 and 385: KSH ( 1 ) KSH ( 1) fc -e - [ old= n
- Page 386 and 387: KSH ( 1 ) KSH(l) ?, the remainder o
- Page 388 and 389: KSH (l) KSH(l) test [ expr ] Evalua
- Page 390 and 391: KSH ( 1 ) KSH(l) ulimit [ -cdfmpt 1
- Page 393 and 394: LD ( 1 ) LD (1) NAME ld - link edit
- Page 395: LD ( 1 ) FILES LD ( 1) allow compat
- Page 398 and 399: LEX(l) LEX(l) EXAMPLE character def
- Page 401 and 402: LINT ( l ) LINT ( 1 ) NAME lint - a
- Page 403: LOGNAME ( l ) LOGNAME ( l ) NAME lo
- Page 406 and 407: I� �- '--- . ·
- Page 408 and 409: LP (l) LP (l) -ooption Specify prin
- Page 410 and 411: LPSTAT (l) LPSTAT (l) SEE ALSO enab
- Page 412 and 413: LS (l) LS (l) -f Force each argumen
- Page 415 and 416: M4 ( 1 ) M4 ( 1) NAME m4 - macro pr
KSH ( 1) KSH ( 1)<br />
The following exported aliases are compiled into the shell but can<br />
be unset or redefined:<br />
echo='print -'<br />
false= 'let 0'<br />
history='fc -1'<br />
integer= 'typeset -i'<br />
pwd= 'print - $PWD '<br />
r='fc -e - '<br />
true= 'let 1'<br />
type= 'whence -v '<br />
hash='alias -t'<br />
Tilde Substitution.<br />
After alias substitution is performed, each word is checked to see<br />
if it begins with an unquoted -. If it does, then the word up to a<br />
/ is checked to see if it matches a user name in the /etc/ passwd<br />
file. If a match is found, the - and the matched login name are<br />
replaced by the login directory of the matched user. This is called<br />
a tilde substitution. If no match is found, the original text is left<br />
unchanged. A - by itself, or in front of a /, is replaced by the<br />
value of the HOME parameter. A - followed by a + or - is<br />
replaced by the value of the parameter PWD and OLDPWD<br />
respectively.<br />
In addition, the value of each keyword parameter is checked to see<br />
if it begins with a - or if a - appears after a :. In either of these<br />
cases a tilde substitution is attempted.<br />
Command Substitution. l<br />
The standard output from a command enclosed in a pair of grave<br />
accents ( ") may be used as part or all of a word; trailing newlines<br />
are removed. The command substitution 'cat file' can be<br />
replaced by the equivalent but faster '