diff --git a/sh.1tbl b/sh.1tbl index 3a78557..043c618 100644 --- a/sh.1tbl +++ b/sh.1tbl @@ -1,8 +1,11 @@ -.\" $MirBSD: sh.1tbl,v 1.5 2004/03/22 19:03:53 tg Exp $ -.\" $OpenBSD: sh.1tbl,v 1.44 2004/01/23 23:08:45 jmc Exp $ +.\" $MirBSD: sh.1tbl,v 1.6 2004/04/07 16:56:19 tg 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 .\" 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 .\" modification, are permitted provided that the following conditions @@ -16,7 +19,7 @@ .\" may be used to endorse or promote products derived from this software .\" 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 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE @@ -30,19 +33,19 @@ .\" .\" @(#)ksh.1tbl 8.2 (Berkeley) 8/19/96 .\" -.Dd August 19, 1996 +.Dd April 7, 2004 .Dt SH 1 .Os .Sh NAME .Nm sh -.Nd public domain Bourne shell +.Nd MirOS Bourne shell (derived from pdksh) .Sh SYNOPSIS -.Nm sh +.Nm .Op Fl +abCefhiklmnprsuvxX .Op Fl +o Ar option .Oo [ Fl c Ar command-string [ .Xo Ar command-name ] No \&| Fl s No \&| -.Ar file No ]\ +.Ar file No ]\ \& .Xc .Op Ar argument ... Oc .Sh DESCRIPTION @@ -53,7 +56,7 @@ interactive and script use. The following options can be specified only on the command line: .Bl -tag -width Ds .It Fl c Ar command-string -.Nm sh +.Nm will execute the command(s) contained in .Ar command-string . .It Fl i @@ -94,7 +97,7 @@ option is used or if both standard input and standard error are attached to a tty. An interactive shell has job control enabled (if available), ignores the .Dv SIGINT , -.Dv SIGQUIT , +.Dv SIGQUIT and .Dv SIGTERM signals, and prints prompts before reading input (see @@ -135,7 +138,7 @@ command is disabled. .It The .Ev SHELL , -.Ev ENV , +.Ev ENV and .Ev PATH parameters cannot be changed. @@ -223,7 +226,7 @@ characters (space, tab, and newline) or meta-characters .Ql > , .Ql | , .Ql \&; , -.Ql ( , +.Ql ( and .Ql \&) .Pc . @@ -276,7 +279,7 @@ shell and must be quoted if they are to represent themselves: .Ql { , .Ql } , .Ql * , -.Ql \&? , +.Ql \&? and .Ql [ . The first three of these are the above mentioned quoting characters (see @@ -309,7 +312,7 @@ style alterations (see below); and finally, .Ql * , -.Ql \&? , +.Ql \&? and .Ql [ are used in file name generation (see @@ -333,9 +336,8 @@ A simple-command consists of some combination of parameter assignments below), input/output redirections (see .Sx Input/output redirections -below), -and command words; the only restriction is that parameter assignments come -before any command words. +below) and command words; the only restriction is that +parameter assignments come before any command words. The command words, if any, define the command that is to be executed and its arguments. The command may be a shell built-in @@ -376,7 +378,7 @@ tokens: .Ql && , .Ql || , .Ql & , -.Ql |& , +.Ql |& and .Ql \&; . The first two are for conditional execution: @@ -397,7 +399,7 @@ and .Ql || have equal precedence which is higher than that of .Ql & , -.Ql |& , +.Ql |& and .Ql \&; , 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 redirections): .Pp -.TS -center; -lfB lfB lfB lfB lfB . -case else function ! -do esac if until [[ -done fi in while { -elif for time then } -.TE +.Ic case , do , done , elif , +.Ic else , esac , fi , for , +.Ic function , if , in , +.Ic then , time , until , while , +.Ic \&! , \&[ , \&{ , \&} .Pp .Sy Note: 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: .Sq A , .Sq B , -.Sq "" , +.Sq "" and .Sq D . Note that if the @@ -883,8 +882,8 @@ or where .Ar name is a parameter name. -If substitution is performed on a parameter that is not set, a -null string is substituted unless the +If substitution is performed on a parameter +that is not set, a null string is substituted unless the .Ic nounset option .Po @@ -1263,6 +1262,7 @@ below. .It Ev PPID The process ID of the shell's parent (read-only). .It Ev PS1 +The primary prompt for interactive shells. The prompt is printed verbatim (i.e., no substitutions are done). Default is .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 .Ic set Fl x 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 .Dq \&+\ \& . .It Ev PWD @@ -1324,7 +1324,7 @@ In parameter assignments (those preceding a simple-command or those occurring in the arguments of .Ic alias , .Ic export , -.Ic readonly , +.Ic readonly and .Ic typeset ) , tilde expansion is done after any unquoted colon @@ -1390,7 +1390,7 @@ matches the strings .Dq foobarfoo , etc. .Sm off -.It Xo Ic \&+( Ar pattern Ic \&| No \ ...\ +.It Xo Ic \&+( Ar pattern Ic \&| No \ ...\ \& .Ic \&| Ar pattern Ic \&) .Xc .Sm on @@ -1404,7 +1404,7 @@ matches the strings .Dq foobar , etc. .Sm off -.It Xo Ic \&?( Ar pattern Ic \&| No \ ...\ +.It Xo Ic \&?( Ar pattern Ic \&| No \ ...\ \& .Ic \&| Ar pattern Ic \&) .Xc .Sm on @@ -1418,7 +1418,7 @@ only matches the strings and .Dq bar . .Sm off -.It Xo Ic \&@( Ar pattern Ic \&| No \ ...\ +.It Xo Ic \&@( Ar pattern Ic \&| No \ ...\ \& .Ic \&| Ar pattern Ic \&) .Xc .Sm on @@ -1430,7 +1430,7 @@ only matches the strings and .Dq bar . .Sm off -.It Xo Ic \&!( Ar pattern Ic \&| No \ ...\ +.It Xo Ic \&!( Ar pattern Ic \&| No \ ...\ \& .Ic \&| Ar pattern Ic \&) .Xc .Sm on @@ -1557,7 +1557,7 @@ backslash escapes for .Ql $ , .Ql ` , -.Ql \e , +.Ql \e and .Ql \enewline . 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 command, and as the value of an assignment to an integer parameter. .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 (listed and grouped in increasing order of precedence): .Pp @@ -2044,7 +2044,7 @@ command. Argument expansion of .Ic alias , .Ic export , -.Ic readonly , +.Ic readonly and .Ic typeset commands. @@ -2271,9 +2271,9 @@ below for more information). .Ar ... .Oc .Xc -Set or view the current emacs command editing key bindings/macros (see -.Sx Emacs interactive input line editing -below for a complete description). +Set or view the current emacs command editing key bindings/macros. +.Nm +should not have emacs mode, according to Bourne shell documentation, though. .It Ic break Op Ar level Exit the .Ar level Ns th @@ -2315,7 +2315,7 @@ is used. If .Ar dir is -.Ql - , +.Dq - , the previous working directory is used (see .Ev OLDPWD parameter). @@ -2370,7 +2370,8 @@ 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 .Tn POSIX Ns ish -systems, it is the value returned by +systems, +it is the value returned by .Ic getconf CS_PATH ) . .It Ic continue Op Ar level Jumps to the beginning of the @@ -2608,7 +2609,7 @@ These include .Ql \en , .Ql \er , .Ql \et , -.Ql \ev , +.Ql \ev and .Ql \e0### .Po @@ -2883,7 +2884,7 @@ during file name generation. .It Ic bgnice Background jobs are run with lower priority. .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 must be used. .It Ic nohup @@ -3421,7 +3422,7 @@ Parameters (or functions) are placed in the environment of any executed commands. Exported functions are not yet implemented. .El -.It Xo Ic ulimit Op Fl acdfHlmnpsStv +.It Xo Ic ulimit Op Fl acdfHlmnpsSt .Op Ar value .Xc Display or set process limits. @@ -3486,6 +3487,11 @@ Impose a time limit of .Ar n .Tn CPU 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 .Pp As far as @@ -3639,7 +3645,7 @@ A job may be referred to in .Ic bg , .Ic fg , .Ic jobs , -.Ic kill , +.Ic kill and .Ic wait 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 .%O "ISBN 1-55937-266-9" .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 -.Nm +.Nm sh is implemented as a run-time option of .Nm pdksh , with only those @@ -3818,6 +3828,10 @@ their part in the shell's development. Any bugs in .Nm pdksh 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 .Nm pdksh .Po @@ -3838,11 +3852,23 @@ and a copy of your script). New versions of .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 -BTW, the most frequently reported bug is: +By the way, the most frequently reported bug is: .Bd -literal -offset indent echo hi | read a; echo $a\ \ \ # Does not print hi .Ed .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.