sync with ksh.1tbl
sh.1tbl is now derived from it
This commit is contained in:
parent
455051d58e
commit
bc29832339
128
sh.1tbl
128
sh.1tbl
@ -1,8 +1,11 @@
|
|||||||
.\" $MirBSD: sh.1tbl,v 1.5 2004/03/22 19:03:53 tg Exp $
|
.\" $MirBSD: sh.1tbl,v 1.6 2004/04/07 16:56:19 tg Exp $
|
||||||
.\" $OpenBSD: sh.1tbl,v 1.44 2004/01/23 23:08:45 jmc Exp $
|
.\" _MirBSD: ksh.1tbl,v 1.19 2004/04/07 16:54:01 tg Exp $
|
||||||
|
.\" $OpenBSD: ksh.1tbl,v 1.65 2004/01/23 23:08:45 jmc Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1980, 1990, 1993
|
.\" Copyright (c) 1980, 1990, 1993
|
||||||
.\" The Regents of the University of California. All rights reserved.
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
|
.\" Copyright (c) 2003, 2004
|
||||||
|
.\" The MirOS Project (http://mirbsd.de/). All rights reserved.
|
||||||
.\"
|
.\"
|
||||||
.\" Redistribution and use in source and binary forms, with or without
|
.\" Redistribution and use in source and binary forms, with or without
|
||||||
.\" modification, are permitted provided that the following conditions
|
.\" modification, are permitted provided that the following conditions
|
||||||
@ -16,7 +19,7 @@
|
|||||||
.\" may be used to endorse or promote products derived from this software
|
.\" may be used to endorse or promote products derived from this software
|
||||||
.\" without specific prior written permission.
|
.\" without specific prior written permission.
|
||||||
.\"
|
.\"
|
||||||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
|
||||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||||
@ -30,19 +33,19 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" @(#)ksh.1tbl 8.2 (Berkeley) 8/19/96
|
.\" @(#)ksh.1tbl 8.2 (Berkeley) 8/19/96
|
||||||
.\"
|
.\"
|
||||||
.Dd August 19, 1996
|
.Dd April 7, 2004
|
||||||
.Dt SH 1
|
.Dt SH 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm sh
|
.Nm sh
|
||||||
.Nd public domain Bourne shell
|
.Nd MirOS Bourne shell (derived from pdksh)
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm sh
|
.Nm
|
||||||
.Op Fl +abCefhiklmnprsuvxX
|
.Op Fl +abCefhiklmnprsuvxX
|
||||||
.Op Fl +o Ar option
|
.Op Fl +o Ar option
|
||||||
.Oo [ Fl c Ar command-string [
|
.Oo [ Fl c Ar command-string [
|
||||||
.Xo Ar command-name ] No \&| Fl s No \&|
|
.Xo Ar command-name ] No \&| Fl s No \&|
|
||||||
.Ar file No ]\
|
.Ar file No ]\ \&
|
||||||
.Xc
|
.Xc
|
||||||
.Op Ar argument ... Oc
|
.Op Ar argument ... Oc
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
@ -53,7 +56,7 @@ interactive and script use.
|
|||||||
The following options can be specified only on the command line:
|
The following options can be specified only on the command line:
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Fl c Ar command-string
|
.It Fl c Ar command-string
|
||||||
.Nm sh
|
.Nm
|
||||||
will execute the command(s) contained in
|
will execute the command(s) contained in
|
||||||
.Ar command-string .
|
.Ar command-string .
|
||||||
.It Fl i
|
.It Fl i
|
||||||
@ -94,7 +97,7 @@ option is used or if both standard input and standard error are attached
|
|||||||
to a tty.
|
to a tty.
|
||||||
An interactive shell has job control enabled (if available), ignores the
|
An interactive shell has job control enabled (if available), ignores the
|
||||||
.Dv SIGINT ,
|
.Dv SIGINT ,
|
||||||
.Dv SIGQUIT ,
|
.Dv SIGQUIT
|
||||||
and
|
and
|
||||||
.Dv SIGTERM
|
.Dv SIGTERM
|
||||||
signals, and prints prompts before reading input (see
|
signals, and prints prompts before reading input (see
|
||||||
@ -135,7 +138,7 @@ command is disabled.
|
|||||||
.It
|
.It
|
||||||
The
|
The
|
||||||
.Ev SHELL ,
|
.Ev SHELL ,
|
||||||
.Ev ENV ,
|
.Ev ENV
|
||||||
and
|
and
|
||||||
.Ev PATH
|
.Ev PATH
|
||||||
parameters cannot be changed.
|
parameters cannot be changed.
|
||||||
@ -223,7 +226,7 @@ characters (space, tab, and newline) or meta-characters
|
|||||||
.Ql > ,
|
.Ql > ,
|
||||||
.Ql | ,
|
.Ql | ,
|
||||||
.Ql \&; ,
|
.Ql \&; ,
|
||||||
.Ql ( ,
|
.Ql (
|
||||||
and
|
and
|
||||||
.Ql \&)
|
.Ql \&)
|
||||||
.Pc .
|
.Pc .
|
||||||
@ -276,7 +279,7 @@ shell and must be quoted if they are to represent themselves:
|
|||||||
.Ql { ,
|
.Ql { ,
|
||||||
.Ql } ,
|
.Ql } ,
|
||||||
.Ql * ,
|
.Ql * ,
|
||||||
.Ql \&? ,
|
.Ql \&?
|
||||||
and
|
and
|
||||||
.Ql [ .
|
.Ql [ .
|
||||||
The first three of these are the above mentioned quoting characters (see
|
The first three of these are the above mentioned quoting characters (see
|
||||||
@ -309,7 +312,7 @@ style alterations (see
|
|||||||
below);
|
below);
|
||||||
and finally,
|
and finally,
|
||||||
.Ql * ,
|
.Ql * ,
|
||||||
.Ql \&? ,
|
.Ql \&?
|
||||||
and
|
and
|
||||||
.Ql [
|
.Ql [
|
||||||
are used in file name generation (see
|
are used in file name generation (see
|
||||||
@ -333,9 +336,8 @@ A simple-command consists of some combination of parameter assignments
|
|||||||
below),
|
below),
|
||||||
input/output redirections (see
|
input/output redirections (see
|
||||||
.Sx Input/output redirections
|
.Sx Input/output redirections
|
||||||
below),
|
below) and command words; the only restriction is that
|
||||||
and command words; the only restriction is that parameter assignments come
|
parameter assignments come before any command words.
|
||||||
before any command words.
|
|
||||||
The command words, if any, define the command
|
The command words, if any, define the command
|
||||||
that is to be executed and its arguments.
|
that is to be executed and its arguments.
|
||||||
The command may be a shell built-in
|
The command may be a shell built-in
|
||||||
@ -376,7 +378,7 @@ tokens:
|
|||||||
.Ql && ,
|
.Ql && ,
|
||||||
.Ql || ,
|
.Ql || ,
|
||||||
.Ql & ,
|
.Ql & ,
|
||||||
.Ql |& ,
|
.Ql |&
|
||||||
and
|
and
|
||||||
.Ql \&; .
|
.Ql \&; .
|
||||||
The first two are for conditional execution:
|
The first two are for conditional execution:
|
||||||
@ -397,7 +399,7 @@ and
|
|||||||
.Ql ||
|
.Ql ||
|
||||||
have equal precedence which is higher than that of
|
have equal precedence which is higher than that of
|
||||||
.Ql & ,
|
.Ql & ,
|
||||||
.Ql |& ,
|
.Ql |&
|
||||||
and
|
and
|
||||||
.Ql \&; ,
|
.Ql \&; ,
|
||||||
which also have equal precedence.
|
which also have equal precedence.
|
||||||
@ -447,14 +449,11 @@ are only recognized if they are unquoted and if they are used as the first
|
|||||||
word of a command (i.e., they can't be preceded by parameter assignments or
|
word of a command (i.e., they can't be preceded by parameter assignments or
|
||||||
redirections):
|
redirections):
|
||||||
.Pp
|
.Pp
|
||||||
.TS
|
.Ic case , do , done , elif ,
|
||||||
center;
|
.Ic else , esac , fi , for ,
|
||||||
lfB lfB lfB lfB lfB .
|
.Ic function , if , in ,
|
||||||
case else function !
|
.Ic then , time , until , while ,
|
||||||
do esac if until [[
|
.Ic \&! , \&[ , \&{ , \&}
|
||||||
done fi in while {
|
|
||||||
elif for time then }
|
|
||||||
.TE
|
|
||||||
.Pp
|
.Pp
|
||||||
.Sy Note:
|
.Sy Note:
|
||||||
Some shells (but not this one) execute control structure commands in a
|
Some shells (but not this one) execute control structure commands in a
|
||||||
@ -791,7 +790,7 @@ and VAR is set to
|
|||||||
the substitution for $VAR results in four fields:
|
the substitution for $VAR results in four fields:
|
||||||
.Sq A ,
|
.Sq A ,
|
||||||
.Sq B ,
|
.Sq B ,
|
||||||
.Sq "" ,
|
.Sq ""
|
||||||
and
|
and
|
||||||
.Sq D .
|
.Sq D .
|
||||||
Note that if the
|
Note that if the
|
||||||
@ -883,8 +882,8 @@ or
|
|||||||
where
|
where
|
||||||
.Ar name
|
.Ar name
|
||||||
is a parameter name.
|
is a parameter name.
|
||||||
If substitution is performed on a parameter that is not set, a
|
If substitution is performed on a parameter
|
||||||
null string is substituted unless the
|
that is not set, a null string is substituted unless the
|
||||||
.Ic nounset
|
.Ic nounset
|
||||||
option
|
option
|
||||||
.Po
|
.Po
|
||||||
@ -1263,6 +1262,7 @@ below.
|
|||||||
.It Ev PPID
|
.It Ev PPID
|
||||||
The process ID of the shell's parent (read-only).
|
The process ID of the shell's parent (read-only).
|
||||||
.It Ev PS1
|
.It Ev PS1
|
||||||
|
The primary prompt for interactive shells.
|
||||||
The prompt is printed verbatim (i.e., no substitutions are done).
|
The prompt is printed verbatim (i.e., no substitutions are done).
|
||||||
Default is
|
Default is
|
||||||
.Dq \&$\ \&
|
.Dq \&$\ \&
|
||||||
@ -1277,7 +1277,7 @@ used when more input is needed to complete a command.
|
|||||||
Used to prefix commands that are printed during execution tracing (see
|
Used to prefix commands that are printed during execution tracing (see
|
||||||
.Ic set Fl x
|
.Ic set Fl x
|
||||||
command below).
|
command below).
|
||||||
The prompt is printed verbatim (i.e., no substitutions are done).
|
This prompt is printed verbatim (i.e., no substitutions are done).
|
||||||
Default is
|
Default is
|
||||||
.Dq \&+\ \& .
|
.Dq \&+\ \& .
|
||||||
.It Ev PWD
|
.It Ev PWD
|
||||||
@ -1324,7 +1324,7 @@ In parameter assignments (those preceding a simple-command or those occurring
|
|||||||
in the arguments of
|
in the arguments of
|
||||||
.Ic alias ,
|
.Ic alias ,
|
||||||
.Ic export ,
|
.Ic export ,
|
||||||
.Ic readonly ,
|
.Ic readonly
|
||||||
and
|
and
|
||||||
.Ic typeset ) ,
|
.Ic typeset ) ,
|
||||||
tilde expansion is done after any unquoted colon
|
tilde expansion is done after any unquoted colon
|
||||||
@ -1390,7 +1390,7 @@ matches the strings
|
|||||||
.Dq foobarfoo ,
|
.Dq foobarfoo ,
|
||||||
etc.
|
etc.
|
||||||
.Sm off
|
.Sm off
|
||||||
.It Xo Ic \&+( Ar pattern Ic \&| No \ ...\
|
.It Xo Ic \&+( Ar pattern Ic \&| No \ ...\ \&
|
||||||
.Ic \&| Ar pattern Ic \&)
|
.Ic \&| Ar pattern Ic \&)
|
||||||
.Xc
|
.Xc
|
||||||
.Sm on
|
.Sm on
|
||||||
@ -1404,7 +1404,7 @@ matches the strings
|
|||||||
.Dq foobar ,
|
.Dq foobar ,
|
||||||
etc.
|
etc.
|
||||||
.Sm off
|
.Sm off
|
||||||
.It Xo Ic \&?( Ar pattern Ic \&| No \ ...\
|
.It Xo Ic \&?( Ar pattern Ic \&| No \ ...\ \&
|
||||||
.Ic \&| Ar pattern Ic \&)
|
.Ic \&| Ar pattern Ic \&)
|
||||||
.Xc
|
.Xc
|
||||||
.Sm on
|
.Sm on
|
||||||
@ -1418,7 +1418,7 @@ only matches the strings
|
|||||||
and
|
and
|
||||||
.Dq bar .
|
.Dq bar .
|
||||||
.Sm off
|
.Sm off
|
||||||
.It Xo Ic \&@( Ar pattern Ic \&| No \ ...\
|
.It Xo Ic \&@( Ar pattern Ic \&| No \ ...\ \&
|
||||||
.Ic \&| Ar pattern Ic \&)
|
.Ic \&| Ar pattern Ic \&)
|
||||||
.Xc
|
.Xc
|
||||||
.Sm on
|
.Sm on
|
||||||
@ -1430,7 +1430,7 @@ only matches the strings
|
|||||||
and
|
and
|
||||||
.Dq bar .
|
.Dq bar .
|
||||||
.Sm off
|
.Sm off
|
||||||
.It Xo Ic \&!( Ar pattern Ic \&| No \ ...\
|
.It Xo Ic \&!( Ar pattern Ic \&| No \ ...\ \&
|
||||||
.Ic \&| Ar pattern Ic \&)
|
.Ic \&| Ar pattern Ic \&)
|
||||||
.Xc
|
.Xc
|
||||||
.Sm on
|
.Sm on
|
||||||
@ -1557,7 +1557,7 @@ backslash
|
|||||||
escapes for
|
escapes for
|
||||||
.Ql $ ,
|
.Ql $ ,
|
||||||
.Ql ` ,
|
.Ql ` ,
|
||||||
.Ql \e ,
|
.Ql \e
|
||||||
and
|
and
|
||||||
.Ql \enewline .
|
.Ql \enewline .
|
||||||
If multiple here documents are used on the same command line, they are saved in
|
If multiple here documents are used on the same command line, they are saved in
|
||||||
@ -1626,7 +1626,7 @@ as numeric arguments to the
|
|||||||
.Ic test
|
.Ic test
|
||||||
command, and as the value of an assignment to an integer parameter.
|
command, and as the value of an assignment to an integer parameter.
|
||||||
.Pp
|
.Pp
|
||||||
Expressions may contain alpha-numeric parameter identifiers, array references,
|
Expressions may contain alpha-numeric parameter identifiers, array references
|
||||||
and integer constants and may be combined with the following C operators
|
and integer constants and may be combined with the following C operators
|
||||||
(listed and grouped in increasing order of precedence):
|
(listed and grouped in increasing order of precedence):
|
||||||
.Pp
|
.Pp
|
||||||
@ -2044,7 +2044,7 @@ command.
|
|||||||
Argument expansion of
|
Argument expansion of
|
||||||
.Ic alias ,
|
.Ic alias ,
|
||||||
.Ic export ,
|
.Ic export ,
|
||||||
.Ic readonly ,
|
.Ic readonly
|
||||||
and
|
and
|
||||||
.Ic typeset
|
.Ic typeset
|
||||||
commands.
|
commands.
|
||||||
@ -2271,9 +2271,9 @@ below for more information).
|
|||||||
.Ar ...
|
.Ar ...
|
||||||
.Oc
|
.Oc
|
||||||
.Xc
|
.Xc
|
||||||
Set or view the current emacs command editing key bindings/macros (see
|
Set or view the current emacs command editing key bindings/macros.
|
||||||
.Sx Emacs interactive input line editing
|
.Nm
|
||||||
below for a complete description).
|
should not have emacs mode, according to Bourne shell documentation, though.
|
||||||
.It Ic break Op Ar level
|
.It Ic break Op Ar level
|
||||||
Exit the
|
Exit the
|
||||||
.Ar level Ns th
|
.Ar level Ns th
|
||||||
@ -2315,7 +2315,7 @@ is used.
|
|||||||
If
|
If
|
||||||
.Ar dir
|
.Ar dir
|
||||||
is
|
is
|
||||||
.Ql - ,
|
.Dq - ,
|
||||||
the previous working directory is used (see
|
the previous working directory is used (see
|
||||||
.Ev OLDPWD
|
.Ev OLDPWD
|
||||||
parameter).
|
parameter).
|
||||||
@ -2370,7 +2370,8 @@ option is given, a default search path is used instead of the current value of
|
|||||||
.Ev PATH
|
.Ev PATH
|
||||||
(the actual value of the default path is system dependent: on
|
(the actual value of the default path is system dependent: on
|
||||||
.Tn POSIX Ns ish
|
.Tn POSIX Ns ish
|
||||||
systems, it is the value returned by
|
systems,
|
||||||
|
it is the value returned by
|
||||||
.Ic getconf CS_PATH ) .
|
.Ic getconf CS_PATH ) .
|
||||||
.It Ic continue Op Ar level
|
.It Ic continue Op Ar level
|
||||||
Jumps to the beginning of the
|
Jumps to the beginning of the
|
||||||
@ -2608,7 +2609,7 @@ These include
|
|||||||
.Ql \en ,
|
.Ql \en ,
|
||||||
.Ql \er ,
|
.Ql \er ,
|
||||||
.Ql \et ,
|
.Ql \et ,
|
||||||
.Ql \ev ,
|
.Ql \ev
|
||||||
and
|
and
|
||||||
.Ql \e0###
|
.Ql \e0###
|
||||||
.Po
|
.Po
|
||||||
@ -2883,7 +2884,7 @@ during file name generation.
|
|||||||
.It Ic bgnice
|
.It Ic bgnice
|
||||||
Background jobs are run with lower priority.
|
Background jobs are run with lower priority.
|
||||||
.It Ic ignoreeof
|
.It Ic ignoreeof
|
||||||
The shell will not exit when end-of-file is read;
|
The shell will not (easily) exit when end-of-file is read;
|
||||||
.Ic exit
|
.Ic exit
|
||||||
must be used.
|
must be used.
|
||||||
.It Ic nohup
|
.It Ic nohup
|
||||||
@ -3421,7 +3422,7 @@ Parameters (or functions) are placed in the environment of
|
|||||||
any executed commands.
|
any executed commands.
|
||||||
Exported functions are not yet implemented.
|
Exported functions are not yet implemented.
|
||||||
.El
|
.El
|
||||||
.It Xo Ic ulimit Op Fl acdfHlmnpsStv
|
.It Xo Ic ulimit Op Fl acdfHlmnpsSt
|
||||||
.Op Ar value
|
.Op Ar value
|
||||||
.Xc
|
.Xc
|
||||||
Display or set process limits.
|
Display or set process limits.
|
||||||
@ -3486,6 +3487,11 @@ Impose a time limit of
|
|||||||
.Ar n
|
.Ar n
|
||||||
.Tn CPU
|
.Tn CPU
|
||||||
seconds to be used by each process.
|
seconds to be used by each process.
|
||||||
|
.It Fl T Ar n
|
||||||
|
Impose a real time limit of
|
||||||
|
.Ar n
|
||||||
|
.Tn human
|
||||||
|
seconds to be used by each process.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
As far as
|
As far as
|
||||||
@ -3639,7 +3645,7 @@ A job may be referred to in
|
|||||||
.Ic bg ,
|
.Ic bg ,
|
||||||
.Ic fg ,
|
.Ic fg ,
|
||||||
.Ic jobs ,
|
.Ic jobs ,
|
||||||
.Ic kill ,
|
.Ic kill
|
||||||
and
|
and
|
||||||
.Ic wait
|
.Ic wait
|
||||||
commands either by the process ID of the last process in the command pipeline
|
commands either by the process ID of the last process in the command pipeline
|
||||||
@ -3787,8 +3793,12 @@ signal and the shell exits.
|
|||||||
.%D 1993
|
.%D 1993
|
||||||
.%O "ISBN 1-55937-266-9"
|
.%O "ISBN 1-55937-266-9"
|
||||||
.Re
|
.Re
|
||||||
|
.Sh VERSION
|
||||||
|
This page documents version @(#)PD KSH v5.2.14 99/07/13.2 of the public
|
||||||
|
domain Korn shell, as delivered with
|
||||||
|
.Mx .
|
||||||
.Sh NOTES
|
.Sh NOTES
|
||||||
.Nm
|
.Nm sh
|
||||||
is implemented as a run-time option of
|
is implemented as a run-time option of
|
||||||
.Nm pdksh ,
|
.Nm pdksh ,
|
||||||
with only those
|
with only those
|
||||||
@ -3818,6 +3828,10 @@ their part in the shell's development.
|
|||||||
Any bugs in
|
Any bugs in
|
||||||
.Nm pdksh
|
.Nm pdksh
|
||||||
should be reported to pdksh@cs.mun.ca.
|
should be reported to pdksh@cs.mun.ca.
|
||||||
|
Do not forget to report to the
|
||||||
|
.Mx
|
||||||
|
developer team as well, because the modifications
|
||||||
|
imposed may have introduced different behaviour.
|
||||||
Please include the version of
|
Please include the version of
|
||||||
.Nm pdksh
|
.Nm pdksh
|
||||||
.Po
|
.Po
|
||||||
@ -3838,11 +3852,23 @@ and a copy of your
|
|||||||
script).
|
script).
|
||||||
New versions of
|
New versions of
|
||||||
.Nm pdksh
|
.Nm pdksh
|
||||||
can be obtained from ftp://ftp.cs.mun.ca/pub/pdksh.
|
can be obtained from \fBftp://ftp.cs.mun.ca/pub/pdksh\fR.
|
||||||
.Pp
|
.Pp
|
||||||
BTW, the most frequently reported bug is:
|
By the way, the most frequently reported bug is:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
echo hi | read a; echo $a\ \ \ # Does not print hi
|
echo hi | read a; echo $a\ \ \ # Does not print hi
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
I'm aware of this and there is no need to report it.
|
The
|
||||||
|
.Nm pdksh
|
||||||
|
author is aware of this and there is no need to report it.
|
||||||
|
For another known bug, refer to the comment above the
|
||||||
|
.Em complete-command
|
||||||
|
paragraph in the section
|
||||||
|
.Sx Emacs editing mode
|
||||||
|
in
|
||||||
|
.Xr ksh 3 .
|
||||||
|
.br
|
||||||
|
The
|
||||||
|
.Mx
|
||||||
|
team is luckily accepting fixes for known (and unknown) bugs.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user