ksh(1)

 

ksh(1)

MAIL

If this parameter is set to the name of a mail ®le and the MAILPATH parameter is

 

not set, the shell informs the user of arrival of mail in the speci®ed ®le.

MAILCHECK

This variable speci®es how often (in seconds) the shell checks for changes in the

 

modi®cation time of any of the ®les speci®ed by the MAILPATH or MAIL parame-

 

ters. The default value is 600 seconds. When the time has elapsed the shell checks

 

before issuing the next prompt.

 

MAILPATH

A list of ®le names separated by colons (:). If this parameter is set, the shell informs

 

the user of any modi®cations to the speci®ed ®les that have occurred within the last

 

MAILCHECK seconds. Each ®le name can be followed by a ? and a message to be

 

printed, in which case the message undergoes parameter and command substitution

 

with the parameter $_ de®ned as the name of the changed ®le. The default message

 

is you have mail in $_.

 

PATH

The search path for commands (see Execution below). The user cannot change PATH

 

if executing rksh (except in the .profile ®le).

PS1

The value of this parameter is expanded for parameter substitution, to de®ne the pri-

 

mary prompt string which, by default, is $ followed by a space character. The char-

 

acter ! in the primary prompt string is replaced by the command number (see Com-

 

mand Re-entrybelow). To include a

! in the prompt, use !!.

PS2

Secondary prompt string, by default

> followed by a space character.

PS3

Selection prompt string used within a select loop, by default #? followed by a

 

space character.

 

PS4

The value of this variable is expanded for parameter substitution and precedes each

 

line of an execution trace. If PS4 is unset, the execution trace prompt is + followed

 

by a space character.

 

SHELL

The path name of the shell is kept in the environment. When invoked, the shell is

 

restricted if the value of this variable contains an r in the basename.

TMOUT

If set to a value greater than zero, the shell terminates if a command is not entered

 

within the prescribed number of seconds after issuing the PS1 prompt.

VISUAL

Invokes the corresponding option when the value of this variable ends in emacs,

 

gmacs, or vi (see set in Special Commands below).

The shell gives default values to PATH, PS1, PS2, MAILCHECK, TMOUT, and IFS. HOME, SHELL, ENV, and MAIL are never set automatically by the shell (although HOME, SHELL, and MAIL are set by login(1)).

Blank Interpretation

After parameter and command substitution, the results of substitution are scanned for ®eld separator characters (found in IFS), and split into distinct arguments where such characters are found. ksh retains explicit null arguments ( or ' ') but removes implicit null arguments (those resulting from parameters that have no values).

File Name Generation

Following substitution, each command word is processed as a pattern for ®le name expansion unless the -foption has been set. The form of the patterns is the Pattern Matching Notation de®ned by regexp(5). The word is replaced with sorted ®le names matching the pattern. If no ®le name is found that matches the pattern, the word is left unchanged.

In addition to the notation described in regexp(5), ksh recognizes composite patterns made up of one or more pattern lists separated from each other with a . Composite patterns can be formed with one or more of the following:

?(pattern-list)Optionally matches any one of the given patterns.

*(pattern-list)Matches zero or more occurrences of the given patterns.

+(pattern-list)Matches one or more occurrences of the given patterns.

@(pattern-list)Matches exactly one of the given patterns.

!(pattern-list)Matches anything, except one of the given patterns.

Quoting

Each of the metacharacters listed above (See De®nitions above) has a special meaning to the shell and causes termination of a word unless quoted. A character can be quoted (i.e., made to stand for itself) by preceding it with a \. The pair \new-lineis ignored. All characters enclosed between a pair of single quote marks (' '), are quoted. A single quote cannot appear within single quotes. Inside double quote marks

HP-UX Release 11i: December 2000

− 6 −

Section 1401

k