sync and bump to 1.16
This commit is contained in:
parent
856e71aa7f
commit
7037f90d4d
19
README
19
README
@ -1,4 +1,4 @@
|
|||||||
$MirBSD: README,v 1.4 2004/10/28 11:11:16 tg Exp $
|
$MirBSD: README,v 1.5 2004/11/10 17:22:12 tg Exp $
|
||||||
|
|
||||||
This is the README for mirbsdksh, developed as part of the MirBSD
|
This is the README for mirbsdksh, developed as part of the MirBSD
|
||||||
operating system at The MirOS Project, and produced portably.
|
operating system at The MirOS Project, and produced portably.
|
||||||
@ -26,10 +26,10 @@ to your likes. Don't complain if anything doesn't work.
|
|||||||
|
|
||||||
LEGAL INFORMATION
|
LEGAL INFORMATION
|
||||||
|
|
||||||
This package as a whole is placed under the MirOS licence, found at
|
This package as a whole is placed under the MirOS licence template
|
||||||
https://mirbsd.bsdadvocacy.org/cvs.cgi/src/share/misc/licence.template
|
as contained in the "version.c" source code file in this distribu-
|
||||||
as well as on top of the "Build.sh" or "rnd.c" files found in the
|
tion, by having the project leader asserting a collective copyright.
|
||||||
distribution.
|
|
||||||
The files alloc.c (Marc Espie), ksh.1tbl and sh.1tbl (University of
|
The files alloc.c (Marc Espie), ksh.1tbl and sh.1tbl (University of
|
||||||
California, Berkeley) are provided under a 2-clause or 3-clause BSD
|
California, Berkeley) are provided under a 2-clause or 3-clause BSD
|
||||||
licence, respectively.
|
licence, respectively.
|
||||||
@ -40,6 +40,7 @@ aclocal.m4, from which only the functions which required the file to
|
|||||||
be under the GNU GPL have been removed.
|
be under the GNU GPL have been removed.
|
||||||
|
|
||||||
|
|
||||||
|
The information below is mostly unmaintained.
|
||||||
________________________________________________________________________
|
________________________________________________________________________
|
||||||
|
|
||||||
$OpenBSD: README,v 1.10 2003/03/10 03:48:16 david Exp $
|
$OpenBSD: README,v 1.10 2003/03/10 03:48:16 david Exp $
|
||||||
@ -79,17 +80,9 @@ them).
|
|||||||
|
|
||||||
|
|
||||||
Files of interest:
|
Files of interest:
|
||||||
NEWS short list of noticeable changes in various versions.
|
|
||||||
CONTRIBUTORS short history of pdksh, people who contributed, etc.
|
CONTRIBUTORS short history of pdksh, people who contributed, etc.
|
||||||
NOTES lists of known bugs in pdksh, at&t ksh, and posix.
|
NOTES lists of known bugs in pdksh, at&t ksh, and posix.
|
||||||
PROJECTS list of things that need to be done in pdksh.
|
PROJECTS list of things that need to be done in pdksh.
|
||||||
BUG-REPORTS list of recently reported bugs that have been fixed
|
|
||||||
and all reported bugs that haven't been fixed.
|
|
||||||
LEGAL A file detailing legal issues concerning pdksh.
|
|
||||||
etc/* system profile and kshrc files used by Simon J. Gerraty.
|
|
||||||
misc/README* readme files from previous versions.
|
|
||||||
misc/Changes* changelog files from previous versions.
|
|
||||||
os2/* files and info needed to compile ksh on os/2.
|
|
||||||
tests/* pdksh's regression testing system.
|
tests/* pdksh's regression testing system.
|
||||||
|
|
||||||
|
|
||||||
|
152
sh.1tbl
152
sh.1tbl
@ -1,6 +1,7 @@
|
|||||||
.\" $MirBSD: sh.1tbl,v 1.10 2004/10/28 16:49:48 tg Exp $
|
.\" $MirBSD: sh.1tbl,v 1.11 2004/11/10 17:22:13 tg Exp $
|
||||||
.\" _MirBSD: src/bin/ksh/ksh.1tbl,v 1.34 2004/10/28 16:49:13 tg Exp $
|
.\" _MirBSD: src/bin/ksh/ksh.1tbl,v 1.41 2004/11/10 17:18:29 tg Exp $
|
||||||
.\" $OpenBSD: ksh.1tbl,v 1.72 2004/08/07 16:46:58 millert Exp $
|
.\" $OpenBSD: ksh.1tbl,v 1.78 2004/11/08 23:42:02 jmc Exp $
|
||||||
|
.\" $OpenBSD: sh.1tbl,v 1.52 2004/11/09 21:56:54 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.
|
||||||
@ -33,10 +34,10 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" @(#)ksh.1tbl 8.2 (Berkeley) 8/19/96
|
.\" @(#)ksh.1tbl 8.2 (Berkeley) 8/19/96
|
||||||
.\"
|
.\"
|
||||||
.Dd April 7, 2004
|
.Dd November 10, 2004
|
||||||
.Dt SH 1
|
.Dt SH 1
|
||||||
.Os MirOS
|
.Os MirOS
|
||||||
.\" define Mx macro for portable mksh
|
.\" define Mx macro for portable mksh, just in case...
|
||||||
.de Mx
|
.de Mx
|
||||||
.nr cF \\n(.f
|
.nr cF \\n(.f
|
||||||
.nr cZ \\n(.s
|
.nr cZ \\n(.s
|
||||||
@ -48,11 +49,14 @@
|
|||||||
. if "\\$1"6" \&MirOS #6\\*(aa
|
. if "\\$1"6" \&MirOS #6\\*(aa
|
||||||
. if "\\$1"." \&MirOS\\$1\\*(aa
|
. if "\\$1"." \&MirOS\\$1\\*(aa
|
||||||
. if "\\$1"," \&MirOS\\$1\\*(aa
|
. if "\\$1"," \&MirOS\\$1\\*(aa
|
||||||
|
. if "\\$1"MirBSD" \&MirBSD\\*(aa
|
||||||
.\}
|
.\}
|
||||||
..
|
..
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
.Nm ksh ,
|
||||||
|
.Nm mksh ,
|
||||||
.Nm sh
|
.Nm sh
|
||||||
.Nd MirOS Bourne shell (derived from pdksh)
|
.Nd MirBSD Korn/Bourne shell
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl +abCefhiklmnprsuvxX
|
.Op Fl +abCefhiklmnprsuvxX
|
||||||
@ -68,8 +72,11 @@
|
|||||||
.Xc
|
.Xc
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Nm
|
.Nm
|
||||||
is a reimplementation of the Bourne shell, a command interpreter for both
|
is a command interpreter intended for both interactive and shell
|
||||||
interactive and script use.
|
script use.
|
||||||
|
Its command language is a superset of the
|
||||||
|
.Xr sh C
|
||||||
|
shell language and compatible to the original Bourne shell.
|
||||||
.Ss Shell startup
|
.Ss Shell startup
|
||||||
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
|
||||||
@ -472,6 +479,15 @@ 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
|
||||||
|
.\" center;
|
||||||
|
.\" lfB lfB lfB lfB lfB .
|
||||||
|
.\" case else function then !
|
||||||
|
.\" do esac if time [[
|
||||||
|
.\" done fi in until {
|
||||||
|
.\" elif for select while }
|
||||||
|
.\" .TE
|
||||||
|
.\"
|
||||||
.Ic case , do , done , elif ,
|
.Ic case , do , done , elif ,
|
||||||
.Ic else , esac , fi , for ,
|
.Ic else , esac , fi , for ,
|
||||||
.Ic function , if , in ,
|
.Ic function , if , in ,
|
||||||
@ -817,8 +833,8 @@ the sequence of characters
|
|||||||
contains four fields:
|
contains four fields:
|
||||||
.Sq A ,
|
.Sq A ,
|
||||||
.Sq B ,
|
.Sq B ,
|
||||||
.Sq ""
|
.Sq
|
||||||
and
|
(an empty field) and
|
||||||
.Sq D .
|
.Sq D .
|
||||||
Note that if the
|
Note that if the
|
||||||
.Ev IFS
|
.Ev IFS
|
||||||
@ -830,17 +846,17 @@ Also, note that the field splitting applies only to the immediate result of
|
|||||||
the substitution.
|
the substitution.
|
||||||
Using the previous example, the substitution for $VAR:E
|
Using the previous example, the substitution for $VAR:E
|
||||||
results in the fields:
|
results in the fields:
|
||||||
.Dq A ,
|
.Sq A ,
|
||||||
.Dq B ,
|
.Sq B ,
|
||||||
.Dq ,
|
.Sq ""
|
||||||
and
|
and
|
||||||
.Dq D:E ,
|
.Sq D:E ,
|
||||||
not
|
not
|
||||||
.Dq A ,
|
.Sq A ,
|
||||||
.Dq B ,
|
.Sq B ,
|
||||||
.Dq ,
|
.Sq ""
|
||||||
and
|
and
|
||||||
.Dq E .
|
.Sq E .
|
||||||
This behavior is POSIX compliant, but incompatible with some other shell
|
This behavior is POSIX compliant, but incompatible with some other shell
|
||||||
implementations which do field splitting on the word which contained the
|
implementations which do field splitting on the word which contained the
|
||||||
substitution or use
|
substitution or use
|
||||||
@ -1252,7 +1268,13 @@ above for details.
|
|||||||
This parameter is not imported from the environment when the shell is
|
This parameter is not imported from the environment when the shell is
|
||||||
started.
|
started.
|
||||||
.It Ev SH_VERSION
|
.It Ev SH_VERSION
|
||||||
The version of the shell and the date the version was created (read-only).
|
The version of the shell, consisting of the upstream
|
||||||
|
.Nm pdksh
|
||||||
|
version (and sometimes date), the string
|
||||||
|
.Dq MirOS
|
||||||
|
and the
|
||||||
|
.Xr rcs 1
|
||||||
|
revision number (read-only).
|
||||||
.It Ev LINENO
|
.It Ev LINENO
|
||||||
The line number of the function or shell script that is currently being
|
The line number of the function or shell script that is currently being
|
||||||
executed.
|
executed.
|
||||||
@ -1293,7 +1315,18 @@ below.
|
|||||||
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 primary prompt for interactive shells.
|
||||||
The prompt is printed verbatim (i.e., no substitutions are done).
|
Parameter, command, and arithmetic
|
||||||
|
substitutions are performed.
|
||||||
|
.Ql \&!
|
||||||
|
is replaced with the current command number (see the
|
||||||
|
.Ic fc
|
||||||
|
command below).
|
||||||
|
A literal
|
||||||
|
.Ql \&!
|
||||||
|
can be put in the prompt by placing
|
||||||
|
.Ql !!
|
||||||
|
in
|
||||||
|
.Ev PS1 .
|
||||||
Default is
|
Default is
|
||||||
.Dq \&$\ \&
|
.Dq \&$\ \&
|
||||||
for non-root users,
|
for non-root users,
|
||||||
@ -1408,7 +1441,6 @@ represent itself it must be quoted or appear later in the list.
|
|||||||
Like
|
Like
|
||||||
.Ic \&[ Ns .. Ns Ic \&] ,
|
.Ic \&[ Ns .. Ns Ic \&] ,
|
||||||
except it matches any character not inside the brackets.
|
except it matches any character not inside the brackets.
|
||||||
.Sm on
|
|
||||||
Matches any string of characters that matches zero or more occurrences of the
|
Matches any string of characters that matches zero or more occurrences of the
|
||||||
specified patterns.
|
specified patterns.
|
||||||
Example: The pattern
|
Example: The pattern
|
||||||
@ -1488,9 +1520,14 @@ but the original
|
|||||||
.Xr ksh ,
|
.Xr ksh ,
|
||||||
Bourne
|
Bourne
|
||||||
.Xr sh
|
.Xr sh
|
||||||
and
|
and GNU
|
||||||
.Xr bash
|
.Xr bash
|
||||||
do, so this may have to change (too bad).
|
do.
|
||||||
|
For
|
||||||
|
.Nm pdksh ,
|
||||||
|
this may have to change (too bad), but
|
||||||
|
.Nm mksh
|
||||||
|
will not adopt this behaviour.
|
||||||
.Pp
|
.Pp
|
||||||
Note that none of the above pattern elements match either a period
|
Note that none of the above pattern elements match either a period
|
||||||
.Pq Sq \&.
|
.Pq Sq \&.
|
||||||
@ -3810,10 +3847,15 @@ signal and the shell exits.
|
|||||||
.Xr wait 2 ,
|
.Xr wait 2 ,
|
||||||
.Xr getopt 3 ,
|
.Xr getopt 3 ,
|
||||||
.Xr rand 3 ,
|
.Xr rand 3 ,
|
||||||
|
.Xr random 3 ,
|
||||||
.Xr signal 3 ,
|
.Xr signal 3 ,
|
||||||
|
.Xr srand 3 ,
|
||||||
|
.Xr srandom 3 ,
|
||||||
.Xr system 3 ,
|
.Xr system 3 ,
|
||||||
.Xr environ 7
|
.Xr environ 7
|
||||||
.Pp
|
.Pp
|
||||||
|
.Pa http://docsrv.sco.com:507/en/man/html.C/sh.C.html
|
||||||
|
.Pp
|
||||||
.Rs
|
.Rs
|
||||||
.%A Morris Bolsky
|
.%A Morris Bolsky
|
||||||
.%A David Korn
|
.%A David Korn
|
||||||
@ -3853,14 +3895,16 @@ traditional Bourne or
|
|||||||
compliant shells is an issue.
|
compliant shells is an issue.
|
||||||
.Pp
|
.Pp
|
||||||
.Nm mksh
|
.Nm mksh
|
||||||
is the common name for the
|
is the name for the portable version of
|
||||||
.Mx
|
.Mx MirBSD
|
||||||
Korn shell installed in
|
.Nm ksh
|
||||||
|
installed as
|
||||||
.Pa /bin/mksh
|
.Pa /bin/mksh
|
||||||
or
|
on other, foreign, operating systems.
|
||||||
.Pa /usr/local/bin/mksh
|
Visit
|
||||||
on foreign systems, installed from the portable mirbsdksh sources at
|
.Pa http://wiki.mirbsd.de/MirbsdKsh
|
||||||
.Pa http://wiki.mirbsd.de/MirbsdKsh .
|
to obtain the latest version of
|
||||||
|
.Nm mksh .
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
This shell is based on the public domain 7th edition Bourne shell clone by
|
This shell is based on the public domain 7th edition Bourne shell clone by
|
||||||
Charles Forsyth and parts of the BRL shell by Doug A. Gwyn, Doug Kingston,
|
Charles Forsyth and parts of the BRL shell by Doug A. Gwyn, Doug Kingston,
|
||||||
@ -3884,34 +3928,26 @@ The
|
|||||||
file in the source distribution contains a more complete list of people and
|
file in the source distribution contains a more complete list of people and
|
||||||
their part in the shell's development.
|
their part in the shell's development.
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
Any bugs in
|
Send bug reports for
|
||||||
.Nm pdksh
|
.Nm
|
||||||
should be reported to pdksh@cs.mun.ca.
|
to the
|
||||||
Do not forget to report to the
|
|
||||||
.Mx
|
.Mx
|
||||||
developer team as well, because the modifications
|
development team at
|
||||||
imposed may have introduced different behaviour.
|
.Aq miros\-discuss@66h.42h.de .
|
||||||
Please include the version of
|
Please include the version of
|
||||||
.Nm pdksh
|
.Nm
|
||||||
.Po
|
.Po
|
||||||
.Ic echo $SH_VERSION
|
.Ic echo $KSH_VERSION
|
||||||
shows it
|
shows it
|
||||||
.Pc ,
|
.Pc ,
|
||||||
the machine, operating system, and compiler you are using and a description of
|
the machine, operating system, and compiler you are using and how you built
|
||||||
how to repeat the bug (a small shell script that demonstrates the bug is best).
|
.Nm .
|
||||||
The following, if relevant (if you are not sure, include them), can also be
|
Please test if the bug appears with the latest version of the full
|
||||||
helpful: options you are using (both
|
.Nm mksh
|
||||||
.Pa options.h
|
as well.
|
||||||
and
|
We do not extensively use nor support
|
||||||
.Ic set Fl o Ic options )
|
.Nm sh ,
|
||||||
and a copy of your
|
but are accepting bug fixes for its behaviour as well.
|
||||||
.Pa config.h
|
|
||||||
(the file generated by the
|
|
||||||
.Pa configure
|
|
||||||
script).
|
|
||||||
New versions of
|
|
||||||
.Nm pdksh
|
|
||||||
can be obtained from \fBftp://ftp.cs.mun.ca/pub/pdksh\fR.
|
|
||||||
.Pp
|
.Pp
|
||||||
By the way, the most frequently reported bug is:
|
By the way, the most frequently reported bug is:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
@ -3921,13 +3957,3 @@ $ echo hi | read a; echo $a # Does not print hi
|
|||||||
The
|
The
|
||||||
.Nm pdksh
|
.Nm pdksh
|
||||||
author is aware of this and there is no need to report it.
|
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 1 .
|
|
||||||
.br
|
|
||||||
The
|
|
||||||
.Mx
|
|
||||||
team is luckily accepting fixes for known (and unknown) bugs.
|
|
||||||
|
@ -5,5 +5,5 @@ category: pdksh
|
|||||||
stdin:
|
stdin:
|
||||||
echo $KSH_VERSION
|
echo $KSH_VERSION
|
||||||
expected-stdout-pattern:
|
expected-stdout-pattern:
|
||||||
/PD KSH v5\.2\.14 MirOS \$Revision\: 1.15 \$ in (native )?KSH mode( as mksh)?/
|
/PD KSH v5\.2\.14 MirOS \$Revision\: 1.16 \$ in (native )?KSH mode( as mksh)?/
|
||||||
---
|
---
|
||||||
|
14
version.c
14
version.c
@ -1,4 +1,4 @@
|
|||||||
/** $MirBSD: version.c,v 1.15 2004/10/28 16:35:03 tg Exp $ */
|
/** $MirBSD: version.c,v 1.16 2004/11/10 17:22:13 tg Exp $ */
|
||||||
/* $OpenBSD: version.c,v 1.12 1999/07/14 13:37:24 millert Exp $ */
|
/* $OpenBSD: version.c,v 1.12 1999/07/14 13:37:24 millert Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -6,11 +6,11 @@
|
|||||||
* Thorsten "mirabile" Glaser <tg@66h.42h.de>
|
* Thorsten "mirabile" Glaser <tg@66h.42h.de>
|
||||||
*
|
*
|
||||||
* Licensee is hereby permitted to deal in this work without restric-
|
* Licensee is hereby permitted to deal in this work without restric-
|
||||||
* tion, including unlimited rights to use, publically perform, modi-
|
* tion, including unlimited rights to use, publicly perform, modify,
|
||||||
* fy, merge, distribute, sell, give away or sublicence, provided the
|
* merge, distribute, sell, give away or sublicence, provided all co-
|
||||||
* above copyright notices, these terms and the disclaimer are retai-
|
* pyright notices above, these terms and the disclaimer are retained
|
||||||
* ned in all redistributions, or reproduced in accompanying documen-
|
* in all redistributions or reproduced in accompanying documentation
|
||||||
* tation or other materials provided with binary redistributions.
|
* or other materials provided with binary redistributions.
|
||||||
*
|
*
|
||||||
* Licensor hereby provides this work "AS IS" and WITHOUT WARRANTY of
|
* Licensor hereby provides this work "AS IS" and WITHOUT WARRANTY of
|
||||||
* any kind, expressed or implied, to the maximum extent permitted by
|
* any kind, expressed or implied, to the maximum extent permitted by
|
||||||
@ -26,7 +26,7 @@
|
|||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
const char ksh_version[] =
|
const char ksh_version[] =
|
||||||
"@(#)PD KSH v5.2.14 MirOS $Revision: 1.15 $ in "
|
"@(#)PD KSH v5.2.14 MirOS $Revision: 1.16 $ in "
|
||||||
#ifdef MIRBSD_NATIVE
|
#ifdef MIRBSD_NATIVE
|
||||||
"native "
|
"native "
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user