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) ${parameter%pattern } ${parameter%%pattern } If the Korn Shell pattern matches the end of the value of parameter, then substitute the value of parameter with the matched part deleted; otherwise substitute the value of parameter. In the above, word is not evaluated unless it is to be used as the substituted string, so that, in the following example, pwd is executed only if d is not set or is null: echo ${d:- 'pwd'} If the colon ( :) is omitted from the above expressions, then the shell only checks whether parameter is set or not. The following parameters are automatically set by the Korn Shell: # The number of positional parameters in decimal. Flags supplied to the Korn Shell on invocation or by the set command. ? The decimal value returned by the last executed 1 command. $ The process number of this shell. The last argument of the previous command. The process number of the last background command invoked. PPID The process number of the parent of the shell. PWD The present working directory set by the cd command. RANDOM Each time this parameter is referenced, a random integer is generated. The sequence of random numbers can be initialized by assigning a numeric value to RANDOM. REPLY This parameter is set by the select statement and by the read special command when no arguments are supplied. The following parameters are used by the Korn shell: CDPATH the search path for the cd command. COLUMNS If this variable is set, the value is used to define the width of the edit window for the shell edit � modes and for printing select lists. EDITOR If the value of either of these variables ends in - 6-
KSH ( 1 ) KSH(l) emacs, gmacs, or vi, then the corresponding option (see Special Command set below) will be turned on. ENV If this parameter is set, then command and parameter substitution is performed on the value to generate the pathname of the script that will be executed when the Korn shell is invoked (see Invocation below). This file is typically used for alias and function definitions. FCEDIT The default editor name for the fc command. IFS Internal field separators, normally space, ta.b, and new-line, that are used to separate command words which result from command or parameter substitution and for separating words with the special command rea.d. IDSTFILE If this parameter is set when the Korn shell is invoked, then the value is the pathname of the file that will be used to store the command history (see Command Re-entry below). IDSTSIZE If this parameter is set when the Korn shell is invoked, then the number of previously entered commands that are accessible by this shell will be greater than or equal to this number. The default is 128. HOME The default argument (home directory) for the cd command. MAIL If this parameter is set to the name of a mail file and the MAILPATH parameter is not set, then the shell informs the user of arrival of mail in the specified file. MAIL CHECK This variable specifies how often (in seconds) the shell will check for changes in the modification time of any of the files specified by the MAIL PATH or MAIL parameters. The default value is 600 seconds. If set to 0, the shell will check before each prompt. MAILPATH A colon ( : ) separated list of file names. If this parameter is set then the shell informs the user of any modifications to the specified files that have occurred within the last MAILCHECK seconds. Each file name can be followed by a ? and a message that will be printed. The message will undergo parameter and command substitution - 7 -
- 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 366 and 367: KSH ( 1) KSH ( 1) The following exp
- 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
- Page 417 and 418: M4 (1) undivert divnum dnl if else
KSH ( 1 ) KSH(l)<br />
emacs, gmacs, or vi, then the corresponding<br />
option (see Special Command set below) will be<br />
turned on.<br />
ENV If this parameter is set, then command and<br />
parameter substitution is performed on the value<br />
to generate the pathname of the script that will<br />
be executed when the Korn shell is invoked (see<br />
Invocation below). This file is typically used for<br />
alias and function definitions.<br />
FCEDIT<br />
The default editor name for the fc command.<br />
IFS Internal field separators, normally space, ta.b,<br />
and new-line, that are used to separate command<br />
words which result from command or parameter<br />
substitution and for separating words with the<br />
special command rea.d.<br />
IDSTFILE<br />
If this parameter is set when the Korn shell is<br />
invoked, then the value is the pathname of the<br />
file that will be used to store the command history<br />
(see Command Re-entry below).<br />
IDSTSIZE<br />
If this parameter is set when the Korn shell is<br />
invoked, then the number of previously entered<br />
commands that are accessible by this shell will be<br />
greater than or equal to this number. The default<br />
is 128.<br />
HOME<br />
The default argument (home directory) for the cd<br />
command.<br />
MAIL If this parameter is set to the name of a mail file<br />
and the MAILPATH parameter is not set, then<br />
the shell informs the user of arrival of mail in the<br />
specified file.<br />
MAIL CHECK<br />
This variable specifies how often (in seconds) the<br />
shell will check for changes in the modification<br />
time of any of the files specified by the MAIL<br />
PATH or MAIL parameters. The default value<br />
is 600 seconds. If set to 0, the shell will check<br />
before each prompt.<br />
MAILPATH<br />
A colon ( : ) separated list of file names. If this<br />
parameter is set then the shell informs the user of<br />
any modifications to the specified files that have<br />
occurred within the last MAILCHECK seconds.<br />
Each file name can be followed by a ? and a message<br />
that will be printed. The message will<br />
undergo parameter and command substitution<br />
- 7 -