-.\" $OpenBSD: ksh.1,v 1.31 2000/03/17 18:15:16 aaron Exp $
+.\" $OpenBSD: ksh.1,v 1.32 2000/03/17 18:48:43 aaron Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
The meta-characters are used in building the following tokens:
.Ql < ,
.Ql <& ,
+.Ql << ,
.Ql > ,
.Ql >& ,
.Ql >> ,
or
.Ic set Fl h ) ,
the shell tracks all commands.
-This option is set automatically for
-non-interactive shells.
+This option is set automatically for non-interactive shells.
For interactive shells, only the following commands are
automatically tracked:
.Ic cat , cc , chmod , cp ,
it); leading or trailing
.Pf non- Ev IFS
whitespace does create an empty field.
+.Pp
Example: If
.Ev IFS
is set to
tilde expansion is done after any unquoted colon
.Pq Sq \&: ,
and login names are also delimited by colons.
+.Pp
The home directory of previously expanded login names are cached and re-used.
The
.Ic alias -d
In
.Tn POSIX
mode, the expression
-.Dq Fl t
+.Ql Fl t
(preceded by some number of
-.Dq Ic \&!
+.Ql Ic \&!
arguments) is always true as it is a non-zero length string; in
.Pf non- Tn POSIX
mode, it tests if file descriptor 1 is a tty (i.e., the
.Fl V
options are given,
.Ar cmd
-is executed exactly as if the
+is executed exactly as if
.Ic command
had not been specified, with two exceptions.
First,
Parameter assignments are recognized anywhere in a command.
.It Fl l Ic login
The shell is a login shell.
-This can only be set/unset when the shell is
-invoked (see
+This can only be set/unset when the shell is invoked (see
.Sx Shell startup
above).
.It Fl m Ic monitor
is read 13 times in a row.
.It Ic nohup
Do not kill running jobs with a
-.Dv HUP
+.Dv SIGHUP
signal when a login shell exists.
Currently set by default, but this will
change in the future to be compatible with the original Korn shell (which
doesn't have this option, but does send the
-.Dv HUP
+.Dv SIGHUP
signal).
.It Ic nolog
No effect.
.Ic trap
commands, the current state of the traps that have been set since the shell
started.
-Note that the ouput of
+Note that the output of
.Ic trap
can not be usefully piped to another process (an artifact of the fact that
traps are cleared when subprocesses are created).
is not specified, the current width of a parameter (or the width of its first
assigned value) is used.
Trailing whitespace is stripped.
-If necessary, values
-are either stripped of leading characters or space padded to make them fit the
-field width.
+If necessary, values are either stripped of leading characters or space
+padded to make them fit the field width.
.It Fl Z Ns Ar n
Zero fill attribute.
If not combined with
.Ic wait
will return if a signal for which a trap has been set is received, or if a
.Dv SIGHUP ,
-.Dv SIGINT
+.Dv SIGINT ,
or
.Dv SIGQUIT
signal is received.
-.\" $OpenBSD: ksh.1tbl,v 1.31 2000/03/17 18:15:16 aaron Exp $
+.\" $OpenBSD: ksh.1tbl,v 1.32 2000/03/17 18:48:43 aaron Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
The meta-characters are used in building the following tokens:
.Ql < ,
.Ql <& ,
+.Ql << ,
.Ql > ,
.Ql >& ,
.Ql >> ,
or
.Ic set Fl h ) ,
the shell tracks all commands.
-This option is set automatically for
-non-interactive shells.
+This option is set automatically for non-interactive shells.
For interactive shells, only the following commands are
automatically tracked:
.Ic cat , cc , chmod , cp ,
it); leading or trailing
.Pf non- Ev IFS
whitespace does create an empty field.
+.Pp
Example: If
.Ev IFS
is set to
tilde expansion is done after any unquoted colon
.Pq Sq \&: ,
and login names are also delimited by colons.
+.Pp
The home directory of previously expanded login names are cached and re-used.
The
.Ic alias -d
In
.Tn POSIX
mode, the expression
-.Dq Fl t
+.Ql Fl t
(preceded by some number of
-.Dq Ic \&!
+.Ql Ic \&!
arguments) is always true as it is a non-zero length string; in
.Pf non- Tn POSIX
mode, it tests if file descriptor 1 is a tty (i.e., the
.Fl V
options are given,
.Ar cmd
-is executed exactly as if the
+is executed exactly as if
.Ic command
had not been specified, with two exceptions.
First,
Parameter assignments are recognized anywhere in a command.
.It Fl l Ic login
The shell is a login shell.
-This can only be set/unset when the shell is
-invoked (see
+This can only be set/unset when the shell is invoked (see
.Sx Shell startup
above).
.It Fl m Ic monitor
is read 13 times in a row.
.It Ic nohup
Do not kill running jobs with a
-.Dv HUP
+.Dv SIGHUP
signal when a login shell exists.
Currently set by default, but this will
change in the future to be compatible with the original Korn shell (which
doesn't have this option, but does send the
-.Dv HUP
+.Dv SIGHUP
signal).
.It Ic nolog
No effect.
.Ic trap
commands, the current state of the traps that have been set since the shell
started.
-Note that the ouput of
+Note that the output of
.Ic trap
can not be usefully piped to another process (an artifact of the fact that
traps are cleared when subprocesses are created).
is not specified, the current width of a parameter (or the width of its first
assigned value) is used.
Trailing whitespace is stripped.
-If necessary, values
-are either stripped of leading characters or space padded to make them fit the
-field width.
+If necessary, values are either stripped of leading characters or space
+padded to make them fit the field width.
.It Fl Z Ns Ar n
Zero fill attribute.
If not combined with
.Ic wait
will return if a signal for which a trap has been set is received, or if a
.Dv SIGHUP ,
-.Dv SIGINT
+.Dv SIGINT ,
or
.Dv SIGQUIT
signal is received.
-.\" $OpenBSD: sh.1,v 1.17 2000/03/17 18:15:16 aaron Exp $
+.\" $OpenBSD: sh.1,v 1.18 2000/03/17 18:48:43 aaron Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
not specified, or the length of the string value of parameter
.Ar name .
.It Xo Ic ${# Ns Ar name Ns
-.Ic \&[\&*\&]\&} , ${# Ns Ar name Ns Ic \&[\&@\&]\&}
+.Ic [*\&]} , ${# Ns Ar name Ns Ic [@\&]}
.Xc
The number of elements in the array
.Ar name .
.Sm off
.It Xo
-.Ic ${ Ar name Ic \&# Ar pattern Ic \&},\ \&
-.Ic ${ Ar name Ic \&#\&# Ar pattern Ic \&}
+.Ic ${ Ar name Ic # Ar pattern
+.Sm on
+.Ic } ,
+.Sm off
+.Ic ${ Ar name Ic ## Ar pattern Ic \&}
.Xc
.Sm on
If
of them result in the longest match.
.Sm off
.It Xo
-.Ic ${ Ar name Ic \&% Ar pattern Ic \&},\ \&
-.Ic ${ Ar name Ic \&%\&% Ar pattern Ic \&}
+.Ic ${ Ar name Ic % Ar pattern
+.Sm on
+.Ic } ,
+.Sm off
+.Ic ${ Ar name Ic %% Ar pattern Ic }
.Xc
.Sm on
Like
differ somewhat in which commands are considered
special or regular:
.Pp
-POSIX special commands
+.Tn POSIX
+special commands
.Pp
.Ic \&. , \&: , break , continue ,
.Ic eval , exec , exit , export ,
.Pp
.Ic builtin , times , typeset
.Pp
-Very special commands (non-POSIX mode)
+Very special commands
+.Pq Pf non- Tn POSIX
.Pp
.Ic alias , readonly , set , typset
.Pp
-POSIX regular commands
+.Tn POSIX
+regular commands
.Pp
.Ic alias , bg , cd , command ,
.Ic false , fc , fg , getopts ,
.Fl p
option is given, a default search path is used instead of the current value of
.Ev PATH
-(the actual value of the default path is system dependent: on POSIXish
+(the actual value of the default path is system dependent: on
+.Tn POSIX Ns ish
systems, it is the value returned by
.Ic getconf CS_PATH ) .
.It Ic continue Op Ar level
must be used.
.It Ic nohup
Do not kill running jobs with a
-.Dv HUP
+.Dv SIGHUP
signal when a login shell exists.
Currently set by default, but this will
change in the future to be compatible with the original Korn shell (which
doesn't have this option, but does send the
-.Dv HUP
+.Dv SIGHUP
signal).
.It Ic nolog
No effect.
.Ic trap
lists, as a series of
.Ic trap
-commands, the current start of the traps that have been set since the shell
+commands, the current state of the traps that have been set since the shell
started.
.Pp
The original Korn shell's
If necessary, values are either stripped of leading characters or space
padded to make them fit the field width.
.It Fl Z Ns Ar n
-Zero fill attribute. If not combined with
+Zero fill attribute.
+If not combined with
.Fl L ,
this is the same as
.Fl R ,
.It Fl t Ar n
Impose a time limit of
.Ar n
-CPU seconds to be used by each process.
+.Tn CPU
+seconds to be used by each process.
.It Fl v Ar n
Impose a limit of
.Ar n
.Ar job .
.Ic wait
will return if a signal for which a trap has been set is received, or if a
-.Dv HUP ,
-.Dv INT
+.Dv SIGHUP ,
+.Dv SIGINT ,
or
-.Dv QUIT
+.Dv SIGQUIT
signal is received.
.Pp
If no jobs are specified,
.Bl -tag -width "Running"
.It Cm Running
The job has neither stopped nor exited (note that running does not necessarily
-mean consuming CPU time -- the process could be blocked waiting for some
+mean consuming
+.Tn CPU
+time -- the process could be blocked waiting for some
event).
.It Cm Done Op Ar number
The job exited.
state, the shell warns the user that there are stopped jobs and does not exit.
If another attempt is immediately made to exit the shell, the stopped jobs are
sent a
-.Dv HUP
+.Dv SIGHUP
signal and the shell exits.
Similarly, if the
.Ic nohup
a login shell, the shell warns the user and does not exit.
If another attempt
is immediately made to exit the shell, the running jobs are sent a
-.Dv HUP
+.Dv SIGHUP
signal and the shell exits.
.Sh FILES
.Bl -tag -width "/etc/suid_profile" -compact
-.\" $OpenBSD: sh.1tbl,v 1.17 2000/03/17 18:15:16 aaron Exp $
+.\" $OpenBSD: sh.1tbl,v 1.18 2000/03/17 18:48:43 aaron Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
not specified, or the length of the string value of parameter
.Ar name .
.It Xo Ic ${# Ns Ar name Ns
-.Ic \&[\&*\&]\&} , ${# Ns Ar name Ns Ic \&[\&@\&]\&}
+.Ic [*\&]} , ${# Ns Ar name Ns Ic [@\&]}
.Xc
The number of elements in the array
.Ar name .
.Sm off
.It Xo
-.Ic ${ Ar name Ic \&# Ar pattern Ic \&},\ \&
-.Ic ${ Ar name Ic \&#\&# Ar pattern Ic \&}
+.Ic ${ Ar name Ic # Ar pattern
+.Sm on
+.Ic } ,
+.Sm off
+.Ic ${ Ar name Ic ## Ar pattern Ic \&}
.Xc
.Sm on
If
of them result in the longest match.
.Sm off
.It Xo
-.Ic ${ Ar name Ic \&% Ar pattern Ic \&},\ \&
-.Ic ${ Ar name Ic \&%\&% Ar pattern Ic \&}
+.Ic ${ Ar name Ic % Ar pattern
+.Sm on
+.Ic } ,
+.Sm off
+.Ic ${ Ar name Ic %% Ar pattern Ic }
.Xc
.Sm on
Like
differ somewhat in which commands are considered
special or regular:
.Pp
-POSIX special commands
+.Tn POSIX
+special commands
.Pp
.Ic \&. , \&: , break , continue ,
.Ic eval , exec , exit , export ,
.Pp
.Ic builtin , times , typeset
.Pp
-Very special commands (non-POSIX mode)
+Very special commands
+.Pq Pf non- Tn POSIX
.Pp
.Ic alias , readonly , set , typset
.Pp
-POSIX regular commands
+.Tn POSIX
+regular commands
.Pp
.Ic alias , bg , cd , command ,
.Ic false , fc , fg , getopts ,
.Fl p
option is given, a default search path is used instead of the current value of
.Ev PATH
-(the actual value of the default path is system dependent: on POSIXish
+(the actual value of the default path is system dependent: on
+.Tn POSIX Ns ish
systems, it is the value returned by
.Ic getconf CS_PATH ) .
.It Ic continue Op Ar level
must be used.
.It Ic nohup
Do not kill running jobs with a
-.Dv HUP
+.Dv SIGHUP
signal when a login shell exists.
Currently set by default, but this will
change in the future to be compatible with the original Korn shell (which
doesn't have this option, but does send the
-.Dv HUP
+.Dv SIGHUP
signal).
.It Ic nolog
No effect.
.Ic trap
lists, as a series of
.Ic trap
-commands, the current start of the traps that have been set since the shell
+commands, the current state of the traps that have been set since the shell
started.
.Pp
The original Korn shell's
If necessary, values are either stripped of leading characters or space
padded to make them fit the field width.
.It Fl Z Ns Ar n
-Zero fill attribute. If not combined with
+Zero fill attribute.
+If not combined with
.Fl L ,
this is the same as
.Fl R ,
.It Fl t Ar n
Impose a time limit of
.Ar n
-CPU seconds to be used by each process.
+.Tn CPU
+seconds to be used by each process.
.It Fl v Ar n
Impose a limit of
.Ar n
.Ar job .
.Ic wait
will return if a signal for which a trap has been set is received, or if a
-.Dv HUP ,
-.Dv INT
+.Dv SIGHUP ,
+.Dv SIGINT ,
or
-.Dv QUIT
+.Dv SIGQUIT
signal is received.
.Pp
If no jobs are specified,
.Bl -tag -width "Running"
.It Cm Running
The job has neither stopped nor exited (note that running does not necessarily
-mean consuming CPU time -- the process could be blocked waiting for some
+mean consuming
+.Tn CPU
+time -- the process could be blocked waiting for some
event).
.It Cm Done Op Ar number
The job exited.
state, the shell warns the user that there are stopped jobs and does not exit.
If another attempt is immediately made to exit the shell, the stopped jobs are
sent a
-.Dv HUP
+.Dv SIGHUP
signal and the shell exits.
Similarly, if the
.Ic nohup
a login shell, the shell warns the user and does not exit.
If another attempt
is immediately made to exit the shell, the running jobs are sent a
-.Dv HUP
+.Dv SIGHUP
signal and the shell exits.
.Sh FILES
.Bl -tag -width "/etc/suid_profile" -compact