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 (l) KSH(l) test [ expr ] Evaluate conditional expression expr. See test( 1) for usage and description. The arithmetic comparison operators are not restricted to integers. They allow any arithmetic expression. Four additional primitive expressions are allowed: -L file True if file is a symbolic link. filel -nt file2 True if file1 is newer than file2. filel -ot file2 True if file1 is older than file2. file1 -ef file2 True if filel has the same device and i-node number as file2. times Print the accumulated user and system times for the shell and for processes run from the shell. trap [ arg ] [ sig ] ••• Arg is a command to be read and executed when the shell receives signal(s) sig . (Note that arg is scanned once when the trap is set and once when the trap is taken.) Each sig can be given as a number or as the name of the signal. Trap commands are executed in order of signal number. Any attempt to set a trap on a signal that was ignored on entry to the current shell is ineffective. An attempt to trap on signal 11 (memory fault) produces an error. If arg is omitted then all trap(s) sig are reset to their original values. If arg is the null string then this signal is ignored by the shell and by the commands it invokes. If sig is ERR then arg will be executed whenever a command has a non-zero exit code. This trap is not inherited by functions. If sig is 0 or EXIT and the trap statement is executed inside the body of a function, then the command arg is executed after the function completes. If sig is 0 or EXIT for a trap set outside any function then the command arg is executed on exit from the shell. The trap command with no arguments prints a list of commands associated with each signal number. typeset [ -FLRZefilprtux[n ] [ name[ =value ] ] ••• ] Parameter assignments remain in effect after the command completes. When invoked inside a function, a new instance of the parameter name is created. The parameter value and type are restored when the function completes. The following list of attributes may be specified: -F This flag provides UNIX to host-name file mapping on non-UNIX machines. -L Left justify and remove leading blanks from value . If n is non-zero it defines the width of the field, otherwise it is determined by the width of the value of first assignment. When the - 26 -
KSH ( 1) -R -Z KSH(l) parameter is assigned to, it is filled on the right with blanks or truncated, if necessary, to fit into the field. Leading zeros are removed if the -Z flag is also set. The -R flag is turned off. Right justify and fill with leading blanks. If n is non-zero it defines the width of the field, otherwise it is determined by the width of the value of the first assignment. The field is left filled with blanks or truncated from the end if the parameter is reassigned. The -L flag is turned off. Right justify and fill with leading zeros if the first non-blank character is a digit and the -L flag has not been set. If n is non-zero it defines the width of the field, otherwise it is determined by the width of the value of the first assignment. -e Tag the parameter as having an error. This tag is currently unused by the shell and can be set or cleared by the user. -f The names refer to function names rather than parameter names. No assignments can be made and the only other valid flag is -x . -i Parameter is an integer. This makes arithmetic faster. If n is non-zero it defines the output arithmetic base, otherwise the first assignment determines the output base. -1 All upper-case characters converted to lower-case. the upper-case flag, -u, is turned off. -p The output of this command, if any, is written onto the two-way pipe. -r The given names are marked read-only and these names cannot be changed by subsequent assignment. -t Tags the named parameters. Tags are user definable and have no special meaning to the shell. -u All lower-case characters are converted to uppercase characters. The lower-case flag, -1, is turned off. -x The given names are marked for automatic export to the environment of subsequently executed commands. Using + rather than - causes these flags to be turned off. If no name arguments are given but flags are specified, a list of names (and optionally the values) of the parameters which have these flags set is printed. (Using + rather than - keeps the values to be printed.) If no names and flags are given, the names and attributes of all parameters are printed. - 27 -
- 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 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 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
- Page 419 and 420: MAIL ( 1) MAIL (l) NAME mail, rmail
- Page 421 and 422: MAKE(l) MAKE(l) NAME make - maintai
- Page 423 and 424: MAKE ( I) MAKE (l) MAKEFLAGS macro
- Page 425 and 426: MAKE(l) MAKE (I) .C .C - .Sh .sh- .
- Page 427 and 428: MAKE (l) MAKE (l) In the above exam
- Page 429 and 430: MAKEKEY (l) (Domestic Version Only
- Page 431 and 432: MESG ( 1) MESG ( 1) NAME mesg - per
- Page 433 and 434: MESSAGE( ! ) ( AT&T UNIX PC only )
- Page 435: MKDIR (l) MKDIR (l) NAME mkdir - ma
KSH ( 1)<br />
-R<br />
-Z<br />
KSH(l)<br />
parameter is assigned to, it is filled on the right<br />
with blanks or truncated, if necessary, to fit into<br />
the field. Leading zeros are removed if the -Z<br />
flag is also set. The -R flag is turned off.<br />
Right justify and fill with leading blanks. If n is<br />
non-zero it defines the width of the field, otherwise<br />
it is determined by the width of the value of<br />
the first assignment. The field is left filled with<br />
blanks or truncated from the end if the parameter<br />
is reassigned. The -L flag is turned off.<br />
Right justify and fill with leading zeros if the first<br />
non-blank character is a digit and the -L flag has<br />
not been set. If n is non-zero it defines the width<br />
of the field, otherwise it is determined by the<br />
width of the value of the first assignment.<br />
-e Tag the parameter as having an error. This tag is<br />
currently unused by the shell and can be set or<br />
cleared by the user.<br />
-f The names refer to function names rather than<br />
parameter names. No assignments can be made<br />
and the only other valid flag is -x .<br />
-i Parameter is an integer. This makes arithmetic<br />
faster. If n is non-zero it defines the output arithmetic<br />
base, otherwise the first assignment determines<br />
the output base.<br />
-1 All upper-case characters converted to lower-case.<br />
the upper-case flag, -u, is turned off.<br />
-p The output of this command, if any, is written<br />
onto the two-way pipe.<br />
-r The given names are marked read-only and these<br />
names cannot be changed by subsequent assignment.<br />
-t Tags the named parameters. Tags are user<br />
definable and have no special meaning to the shell.<br />
-u All lower-case characters are converted to uppercase<br />
characters. The lower-case flag, -1, is turned<br />
off.<br />
-x The given names are marked for automatic export<br />
to the environment of subsequently executed commands.<br />
Using + rather than - causes these flags to be turned off.<br />
If no name arguments are given but flags are specified, a<br />
list of names (and optionally the values) of the parameters<br />
which have these flags set is printed. (Using + rather<br />
than - keeps the values to be printed.) If no names and<br />
flags are given, the names and attributes of all parameters<br />
are printed.<br />
- 27 -