xref: /titanic_44/usr/src/lib/libshell/common/data/builtins.c (revision 0398691684c2596072212e4ca9d7033ad7ccfa54)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *           Copyright (c) 1982-2007 AT&T Knowledge Ventures            *
5 *                      and is licensed under the                       *
6 *                  Common Public License, Version 1.0                  *
7 *                      by AT&T Knowledge Ventures                      *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *            http://www.opensource.org/licenses/cpl1.0.txt             *
11 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
12 *                                                                      *
13 *              Information and Software Systems Research               *
14 *                            AT&T Research                             *
15 *                           Florham Park NJ                            *
16 *                                                                      *
17 *                  David Korn <dgk@research.att.com>                   *
18 *                                                                      *
19 ***********************************************************************/
20 #pragma prototyped
21 
22 #include	<shell.h>
23 #include	<signal.h>
24 #include	"defs.h"
25 #include	"shtable.h"
26 #include	"ulimit.h"
27 #include	"name.h"
28 #include	"version.h"
29 #if KSHELL
30 #   include	"builtins.h"
31 #   include	"jobs.h"
32 #   include	"FEATURE/cmds"
33 #   define	bltin(x)	(b_##x)
34     /* The following is for builtins that do not accept -- options */
35 #   define	Bltin(x)	(B_##x)
36 #else
37 #   define bltin(x)	0
38 #endif
39 
40 #ifndef SH_CMDLIB_DIR
41 #	define SH_CMDLIB_DIR	"/opt/ast/bin"
42 #endif
43 #if defined(SHOPT_CMDLIB_DIR) && !defined(SHOPT_CMDLIB_HDR)
44 #	define SHOPT_CMDLIB_HDR	<cmdlist.h>
45 #endif
46 #define Q(f)		#f	/* libpp cpp workaround -- fixed 2005-04-11 */
47 #define CMDLIST(f)	SH_CMDLIB_DIR "/" Q(f), NV_BLTIN|NV_NOFREE, bltin(f),
48 
49 #undef	basename
50 #undef	dirname
51 
52 /*
53  * The order up through "[" is significant
54  */
55 const struct shtable3 shtab_builtins[] =
56 {
57 	"login",	NV_BLTIN|BLT_ENV|BLT_SPC,	Bltin(login),
58 	"exec",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(exec),
59 	"set",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(set),
60 	":",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(true),
61 	"true",		NV_BLTIN|BLT_ENV,		bltin(true),
62 	"command",	NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(command),
63 	"cd",		NV_BLTIN|BLT_ENV,		bltin(cd),
64 	"break",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(break),
65 	"continue",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(break),
66 	"typeset",	NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(typeset),
67 	"test",		NV_BLTIN|BLT_ENV|NV_NOFREE,	bltin(test),
68 	"[",		NV_BLTIN|BLT_ENV,		bltin(test),
69 	"let",		NV_BLTIN|BLT_ENV,		bltin(let),
70 	"export",	NV_BLTIN|BLT_SPC|BLT_DCL,	bltin(readonly),
71 #if SHOPT_BASH
72 	"local",	NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(typeset),
73 #endif
74 #if _bin_newgrp || _usr_bin_newgrp
75 	"newgrp",	NV_BLTIN|BLT_ENV|BLT_SPC,	Bltin(login),
76 #endif	/* _bin_newgrp || _usr_bin_newgrp */
77 	".",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(dot_cmd),
78 	"alias",	NV_BLTIN|BLT_SPC|BLT_DCL,	bltin(alias),
79 	"hash",		NV_BLTIN|BLT_SPC|BLT_DCL,	bltin(alias),
80 	"exit",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(return),
81 	"eval",		NV_BLTIN|BLT_ENV|BLT_SPC|BLT_EXIT,bltin(eval),
82 	"fc",		NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(hist),
83 	"hist",		NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(hist),
84 	"readonly",	NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(readonly),
85 	"return",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(return),
86 	"shift",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(shift),
87 	"trap",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(trap),
88 	"unalias",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(unalias),
89 	"unset",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(unset),
90 	"builtin",	NV_BLTIN,			bltin(builtin),
91 #if SHOPT_ECHOPRINT
92 	"echo",		NV_BLTIN|BLT_ENV,		bltin(print),
93 #else
94 	"echo",		NV_BLTIN|BLT_ENV,		Bltin(echo),
95 #endif /* SHOPT_ECHOPRINT */
96 #ifdef JOBS
97 #   ifdef SIGTSTP
98 	"bg",		NV_BLTIN|BLT_ENV,		bltin(bg),
99 	"fg",		NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(bg),
100 	"disown",	NV_BLTIN|BLT_ENV,		bltin(bg),
101 	"kill",		NV_BLTIN|BLT_ENV|NV_NOFREE,	bltin(kill),
102 #   else
103 	"/bin/kill",	NV_BLTIN|BLT_ENV|NV_NOFREE,	bltin(kill),
104 #   endif	/* SIGTSTP */
105 	"jobs",		NV_BLTIN|BLT_ENV,		bltin(jobs),
106 #endif	/* JOBS */
107 	"false",	NV_BLTIN|BLT_ENV,		bltin(false),
108 SH_CMDLIB_DIR "/getconf",NV_BLTIN|BLT_ENV,		bltin(getconf),
109 	"getopts",	NV_BLTIN|BLT_ENV,		bltin(getopts),
110 	"print",	NV_BLTIN|BLT_ENV,		bltin(print),
111 	"printf",	NV_BLTIN|NV_NOFREE,		bltin(printf),
112 	"pwd",		NV_BLTIN|NV_NOFREE,		bltin(pwd),
113 	"read",		NV_BLTIN|BLT_ENV,		bltin(read),
114 	"sleep",	NV_BLTIN|NV_NOFREE,		bltin(sleep),
115 	"alarm",	NV_BLTIN,			bltin(alarm),
116 	"ulimit",	NV_BLTIN|BLT_ENV,		bltin(ulimit),
117 	"umask",	NV_BLTIN|BLT_ENV,		bltin(umask),
118 #ifdef _cmd_universe
119 	"universe",	NV_BLTIN|BLT_ENV,		bltin(universe),
120 #endif /* _cmd_universe */
121 #if SHOPT_FS_3D
122 	"vpath",	NV_BLTIN|BLT_ENV,		bltin(vpath),
123 	"vmap",		NV_BLTIN|BLT_ENV,		bltin(vpath),
124 #endif /* SHOPT_FS_3D */
125 	"wait",		NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(wait),
126 	"type",		NV_BLTIN|BLT_ENV,		bltin(whence),
127 	"whence",	NV_BLTIN|BLT_ENV,		bltin(whence),
128 #ifdef SHOPT_CMDLIB_HDR
129 #include SHOPT_CMDLIB_HDR
130 #else
131 	CMDLIST(basename)
132 	CMDLIST(chmod)
133 	CMDLIST(dirname)
134 	CMDLIST(head)
135 	CMDLIST(mkdir)
136 	CMDLIST(logname)
137 	CMDLIST(cat)
138 	CMDLIST(cmp)
139 	CMDLIST(cut)
140 	CMDLIST(uname)
141 	CMDLIST(wc)
142 	CMDLIST(sync)
143 #endif
144 	"",		0, 0
145 };
146 
147 
148 const char sh_set[] =
149 "[a?Set the export attribute for each variable whose name does not "
150 	"contain a \b.\b that you assign a value in the current shell "
151 	"environment.]"
152 "[b?The shell writes a message to standard error as soon it detects that "
153 	"a background job completes rather than waiting until the next prompt.]"
154 "[e?A simple command that has an non-zero exit status will cause the shell "
155 	"to exit unless the simple command is:]{"
156 	"[++?contained in an \b&&\b or \b||\b list.]"
157 	"[++?the command immediately following \bif\b, \bwhile\b, or \buntil\b.]"
158 	"[++?contained in the pipeline following \b!\b.]"
159 "}"
160 "[f?Pathname expansion is disabled.]"
161 "[h?Obsolete.  Causes each command whose name has the syntax of an "
162 	"alias to become a tracked aliase when it is first encountered.]"
163 "[k?This is obsolete.  All arguments of the form \aname\a\b=\b\avalue\a "
164 	"are removed and placed in the variable assignment list for "
165 	"the command.  Ordinarily, variable assignments must precede "
166 	"command arguments.]"
167 "[m?When enabled, the shell runs background jobs in a separate process "
168 	"group and displays a line upon completion.  This mode is enabled "
169 	"by default for interactive shells on systems that support job "
170 	"control.]"
171 "[n?The shell reads commands and checks for syntax errors, but does "
172 	"not execute the command.  Usually specified on command invocation.]"
173 "[o]:?[option?If \aoption\a is not specified, the list of options and "
174 	"their current settings will be written to standard output.  When "
175 	"invoked with a \b+\b the options will be written in a format "
176 	"that can be reinput to the shell to restore the settings. "
177 	"This option can be repeated to enable/disable multiple options. "
178 	"The value of \aoption\a must be one of the following:]{"
179 		"[+allexport?Equivalent to \b-a\b.]"
180 		"[+bgnice?Runs background jobs at lower priorities.]"
181 		"[+braceexpand?Equivalent to \b-B\b.] "
182 		"[+emacs?Enables/disables \bemacs\b editing mode.]"
183 		"[+errexit?Equivalent to \b-e\b.]"
184 		"[+globstar?Equivalent to \b-G\b.]"
185 		"[+gmacs?Enables/disables \bgmacs\b editing mode.  \bgmacs\b "
186 			"editing mode is the same as \bemacs\b editing mode "
187 			"except for the handling of \b^T\b.]"
188 #if SHOPT_BASH
189 		"[+hashall?Equivalent to \b-h\b and \b-o trackall\b. Available "
190 		"in bash compatibility mode only.]"
191 		"[+history?Enable command history. Available in bash "
192 		"compatibility mode only. On by default in interactive "
193 		"shells.]"
194 #endif
195 #if SHOPT_HISTEXPAND
196 		"[+histexpand?Equivalent to \b-H\b.]"
197 #endif
198 		"[+ignoreeof?Prevents an interactive shell from exiting on "
199 			"reading an end-of-file.]"
200 		"[+keyword?Equivalent to \b-k\b.]"
201 		"[+markdirs?A trailing \b/\b is appended to directories "
202 			"resulting from pathname expansion.]"
203 		"[+monitor?Equivalent to \b-m\b.]"
204 		"[+multiline?Use multiple lines when editing lines that are "
205 			"longer than the window width.]"
206 		"[+noclobber?Equivalent to \b-C\b.]"
207 		"[+noexec?Equivalent to \b-n\b.]"
208 		"[+noglob?Equivalent to \b-f\b.]"
209 		"[+nolog?This has no effect.  It is provided for backward "
210 			"compatibility.]"
211 		"[+notify?Equivalent to \b-b\b.]"
212 		"[+nounset?Equivalent to \b-u\b.]"
213 #if SHOPT_BASH
214 		"[+onecmd?Equivalent to \b-t\b. Available in bash compatibility "
215 		"mode only.]"
216 		"[+physical?Equivalent to \b-P\b. Available in bash "
217 		"compatibility mode only.]"
218 		"[+posix?Turn on POSIX compatibility. Available in bash "
219 		"compatibility mode only. Bash in POSIX mode is not the "
220 		"same as ksh.]"
221 #endif
222 		"[+pipefail?A pipeline will not complete until all components "
223 			"of the pipeline have completed, and the exit status "
224 			"of the pipeline will be the value of the last "
225 			"command to exit with non-zero exit status, or will "
226 			"be zero if all commands return zero exit status.]"
227 		"[+privileged?Equivalent to \b-p\b.]"
228 		"[+showme?Simple commands preceded by a \b;\b will be traced "
229 			"as if \b-x\b were enabled but not executed.]"
230 		"[+trackall?Equivalent to \b-h\b.]"
231 		"[+verbose?Equivalent to \b-v\b.]"
232 		"[+vi?Enables/disables \bvi\b editing mode.]"
233 		"[+viraw?Does not use canonical input mode when using \bvi\b "
234 			"edit mode.]"
235 		"[+xtrace?Equivalent to \b-x\b.]"
236 "}"
237 "[p?Privileged mode.  Disabling \b-p\b sets the effective user id to the "
238 	"real user id, and the effective group id to the real group id.  "
239 	"Enabling \b-p\b restores the effective user and group ids to their "
240 	"values when the shell was invoked.  The \b-p\b option is on "
241 	"whenever the real and effective user id is not equal or the "
242 	"real and effective group id is not equal.  User profiles are "
243 	"not processed when \b-p\b is enabled.]"
244 "[r?restricted.  Enables restricted shell.  This option cannot be unset once "
245 	"enabled.]"
246 "[t?Obsolete.  The shell reads one command and then exits.]"
247 "[u?If enabled, the shell displays an error message when it tries to expand "
248 	"a variable that is unset.]"
249 "[v?Verbose.  The shell displays its input onto standard error as it "
250 	"reads it.]"
251 "[x?Execution trace.  The shell will display each command after all "
252 	"expansion and before execution preceded by the expanded value "
253 	"of the \bPS4\b parameter.]"
254 #if SHOPT_BASH
255 	"\fbash1\f"
256 #endif
257 #if SHOPT_BRACEPAT
258 "[B?Enable {...} group expansion. On by default.]"
259 #endif
260 "[C?Prevents existing regular files from being overwritten using the \b>\b "
261 	"redirection operator.  The \b>|\b redirection overrides this "
262 	"\bnoclobber\b option.]"
263 "[G?Causes \b**\b by itself to also match all sub-directories during pathname "
264 	"expansion.]"
265 #if SHOPT_HISTEXPAND
266    "[H?Enable \b!\b-style history expansion similar to \bcsh\b.]"
267 #endif
268 ;
269 
270 const char sh_optbreak[] =
271 "[-1c?\n@(#)$Id: break (AT&T Research) 1999-04-07 $\n]"
272 USAGE_LICENSE
273 "[+NAME?break - break out of loop ]"
274 "[+DESCRIPTION?\bbreak\b is a shell special built-in that exits the "
275 	"smallest enclosing \bfor\b, \bselect\b, \bwhile\b, or \buntil\b loop, "
276 	"or the \an\a-th enclosing loop if \an\a is specified.  "
277 	"Execution continues at the command following the loop(s).]"
278 "[+?If \an\a is given, it must be a positive integer >= 1. If \an\a "
279 	"is larger than the number of enclosing loops, the last enclosing "
280 	"loop will be exited.]"
281 "\n"
282 "\n[n]\n"
283 "\n"
284 "[+EXIT STATUS?0]"
285 "[+SEE ALSO?\bcontinue\b(1), \breturn\b(1)]"
286 ;
287 
288 const char sh_optcont[] =
289 "[-1c?\n@(#)$Id: continue (AT&T Research) 1999-04-07 $\n]"
290 USAGE_LICENSE
291 "[+NAME?continue - continue execution at top of the loop]"
292 "[+DESCRIPTION?\bcontinue\b is a shell special built-in that continues "
293 	"execution at the top of smallest enclosing enclosing \bfor\b, "
294 	"\bselect\b, \bwhile\b, or \buntil\b loop, if any; or the top of "
295 	"the \an\a-th enclosing loop if \an\a is specified.]"
296 "[+?If \an\a is given, it must be a positive integer >= 1. If \an\a "
297 	"is larger than the number of enclosing loops, the last enclosing "
298 	" loop will be used.]"
299 
300 "\n"
301 "\n[n]\n"
302 "\n"
303 "[+SEE ALSO?\bbreak\b(1)]"
304 ;
305 
306 const char sh_optalarm[]	= "r [varname seconds]";
307 const char sh_optalias[] =
308 "[-1c?\n@(#)$Id: alias (AT&T Research) 1999-07-07 $\n]"
309 USAGE_LICENSE
310 "[+NAME?alias - define or display aliases]"
311 "[+DESCRIPTION?\balias\b creates or redefines alias definitions "
312 	"or writes the existing alias definitions to standard output.  "
313 	"An alias definitions provides a string value that will replace "
314 	"a command name when the command is read.  Alias names can "
315 	"contain any printable character which is not special to the shell.  "
316 	"If an alias value ends in a space or tab, then the word "
317 	"following the command name the alias replaces is also checked "
318 	"to see whether it is an alias.]"
319 "[+?If no \aname\as are specified then the names and values of all "
320 	"aliases are written to standard output.  Otherwise, for "
321 	"each \aname\a that is specified, and \b=\b\avalue\a  is not "
322 	"specified, the current value of the alias corresponding to "
323 	"\aname\a is written to standard output.  If \b=\b\avalue\a is "
324 	"specified, the alias \aname\a will be created or redefined.]"
325 "[+?\balias\b is built-in to the shell as a declaration command so that "
326 	"field splitting and pathname expansion are not performed on "
327 	"the arguments.  Tilde expansion occurs on \avalue\a.  An alias "
328 	"definition only affects scripts read by the current shell "
329 	"environment.  It does not effect scripts run by this shell.]"
330 "[p?Causes the output to be in the form of alias commands that can be used "
331 	"as input to the shell to recreate the current aliases.]"
332 "[t?Used for tracked aliases.  These are aliases that connect a "
333 	"command name to the pathname of the command and are reset "
334 	"when the \bPATH\b variable is unset.  The tracked aliases feature is "
335 	"now obsolete.]"
336 "[x?Ignored, this option is obsolete.]"
337 "\n"
338 "\n[name[=value]...]\n"
339 "\n"
340 "[+EXIT STATUS?]{"
341         "[+0?Successful completion.]"
342         "[+>0?One or more \aname\a operands did not have an alias "
343 		"definition, or an error occurred.]"
344 "}"
345 
346 "[+SEE ALSO?\bsh\b(1), \bunalias\b(1)]"
347 ;
348 
349 const char sh_optbuiltin[] =
350 "[-1c?\n@(#)$Id: builtin (AT&T Research) 1999-07-10 $\n]"
351 USAGE_LICENSE
352 "[+NAME?builtin - add, delete, or display shell built-ins]"
353 "[+DESCRIPTION?\bbuiltin\b can be used to add, delete, or display "
354     "built-in commands in the current shell environment. A built-in command "
355     "executes in the current shell process and can have side effects in the "
356     "current shell. On most systems, the invocation time for built-in "
357     "commands is one or two orders of magnitude less than commands that "
358     "create a separate process.]"
359 "[+?For each \apathname\a specified, the basename of the pathname "
360     "determines the name of the built-in. For each basename, the shell looks "
361     "for a C level function in the current shell whose name is determined by "
362     "prepending \bb_\b to the built-in name. If \apathname\a contains a "
363     "\b/\b, then the built-in is bound to this pathname. A built-in bound to "
364     "a pathname will only be executed if \apathname\a is the first "
365     "executable found during a path search. Otherwise, built-ins are found "
366     "prior to performing the path search.]"
367 "[+?If no \apathname\a operands are specified, then \bbuiltin\b displays "
368     "the current list of built-ins, or just the special built-ins if \b-s\b "
369     "is specified, on standard output. The full pathname for built-ins that "
370     "are bound to pathnames are displayed.]"
371 "[+?Libraries containing built-ins can be specified with the \b-f\b "
372     "option. If the library contains a function named \blib_init\b(), this "
373     "function will be invoked with argument \b0\b when the library is "
374     "loaded. The \blib_init\b() function can load built-ins by invoking an "
375     "appropriate C level function. In this case there is no restriction on "
376     "the C level function name.]"
377 "[+?The C level function will be invoked with three arguments. The first "
378     "two are the same as \bmain\b() and the third one is a pointer.]"
379 "[+?\bbuiltin\b cannot be invoked from a restricted shell.]"
380 "[d?Deletes each of the specified built-ins. Special built-ins cannot be "
381     "deleted.]"
382 "[f]:[lib?On systems with dynamic linking, \alib\a names a shared "
383     "library to load and search for built-ins. Libraries are search for in "
384     "\b$PATH\b and system dependent library directories. The system "
385     "dependent shared library prefix and/or suffix may be omitted. Once a "
386     "library is loaded, its symbols become available for the current and "
387     "subsequent invocations of \bbuiltin\b. Multiple libraries can be "
388     "specified with separate invocations of \bbuiltin\b. Libraries are "
389     "searched in the reverse order in which they are specified.]"
390 "[s?Display only the special built-ins.]"
391 "\n"
392 "\n[pathname ...]\n"
393 "\n"
394 "[+EXIT STATUS?]{"
395 	"[+0?All \apathname\a operands and \b-f\b options processed "
396 	"successfully.]"
397 	"[+>0?An error occurred.]"
398 "}"
399 "[+SEE ALSO?\bwhence\b(1)]"
400 ;
401 
402 const char sh_optcd[] =
403 "[-1c?\n@(#)$Id: cd (AT&T Research) 1999-06-05 $\n]"
404 USAGE_LICENSE
405 "[+NAME?cd - change working directory ]"
406 "[+DESCRIPTION?\bcd\b changes the current working directory of the "
407 	"current shell environment.]"
408 "[+?In the first form with one operand, if \adirectory\a begins with "
409 	"\b/\b, or if the first component is \b.\b or \b..\b, the "
410 	"directory will be changed to this directory.  If directory is \b-\b, "
411 	"the directory will be changed to the last directory visited.  "
412 	"Otherwise, if the \bCDPATH\b environment variable is set, \bcd\b "
413 	"searches for \adirectory\a relative to each directory named in "
414 	"the colon separated list of directories defined by \bCDPATH\b.  "
415 	"If \bCDPATH\b not set, \bcd\b changes to the directory specified "
416 	"by \adirectory\a.]"
417 "[+?In the second form, the first occurrence of the string \aold\a "
418 	"contained in the pathname of the present working directory "
419 	"is replaced by the string \anew\a and the resulting string "
420 	"is used as the directory to which to change.]"
421 "[+?When invoked without operands and when the \bHOME\b environment "
422 	"variable is set to a nonempty value,  the directory named by "
423 	"the \bHOME\b environment variable will be used.  If \bHOME\b "
424 	"is empty or unset, \bcd\b will fail.]"
425 "[+?When \bcd\b is successful, the \bPWD\b environment variable will be set "
426 	"to the name of an absolute pathname that does not contain any "
427 	"\b..\b components corresponding to the new directory.  The "
428 	"environment variable \bOLDPWD\b will be set to the previous "
429 	"value of \bPWD\b.  If the new directory is found by searching "
430 	"the directories named by \bCDPATH\b, or if \adirectory\a is \b-\b, "
431 	"or if the two operand form is used, the new value of \bPWD\b will be "
432 	"written to standard output.]"
433 "[+?If both \b-L\b and \b-P\b are specified, the last one specified will "
434 	"be used.  If neither \b-P\b or \b-L\b is specified then the "
435 	"behavior will be determined by the \bgetconf\b parameter "
436 	"\bPATH_RESOLVE\b.  If \bPATH_RESOLVE\b is \bphysical\b, "
437 	"then the behavior will be as if \b-P\b were specified.  Otherwise, "
438 	"the behavior will be as if  \b-L\b were specified.]"
439 "[L?Handle each pathname component \b..\b in a logical fashion by moving "
440 	"up one level by name in the present working directory.]"
441 "[P?The present working directory is first converted to an absolute pathname "
442 	"that does not contain symbolic link components and symbolic name "
443 	"components are expanded in the resulting directory name.]"
444 "\n"
445 "\n[directory]\n"
446 "old new\n"
447 "\n"
448 "[+EXIT STATUS?]{"
449 	"[+0?Directory successfully changed.]"
450 	"[+>0?An error occurred.]"
451 "}"
452 "[+SEE ALSO?\bpwd\b(1), \bgetconf\b(1)]"
453 ;
454 
455 const char sh_optcommand[] =
456 "[-1c?\n@(#)$Id: command (AT&T Research) 2003-08-01 $\n]"
457 USAGE_LICENSE
458 "[+NAME?command - execute a simple command]"
459 "[+DESCRIPTION?Without \b-v\b or \b-V\b,  \bcommand\b executes \acommand\a "
460 	"with arguments given by \aarg\a, suppressing the shell function lookup "
461 	"that normally occurs.  In addition, if \acommand\a is a special "
462 	"built-in command, then the special properties are removed so that "
463 	"failures will not cause the script that executes it to terminate.]"
464 "[+?With the \b-v\b or \b-V\b options, \bcommand\b is equivalent to the "
465 	"\bwhence\b(1) command.]"
466 "[p?Causes a default path to be searched rather than the one defined by the "
467 	"value of \bPATH\b.]"
468 "[v?Equivalent to \bwhence\b \acommand\a [\aarg\a ...]].]"
469 "[x?If \acommand\a fails because there are too many \aarg\as, it will be "
470 	"invoked multiple times with a subset of the arguments on each "
471 	"invocation.  Arguments that occur prior to the first word that expand "
472 	"to multiple arguments and arguments that occur after the last word "
473 	"that expands to multiple arguments will be passed on each invocation. "
474 	"The exit status will be the maximum invocation exit status.]"
475 "[V?Equivalent to \bwhence \b-v\b \acommand\a [\aarg\a ...]].]"
476 "\n"
477 "\n[command [arg ...]]\n"
478 "\n"
479 "[+EXIT STATUS?If \acommand\a is invoked, the exit status of \bcommand\b "
480 	"will be that of \acommand\a.  Otherwise, it will be one of "
481 	"the following:]{"
482 	"[+0?\bcommand\b completed successfully.]"
483 	"[+>0?\b-v\b or \b-V\b has been specified and an error occurred.]"
484 	"[+126?\acommand\a was found but could not be invoked.]"
485 	"[+127?\acommand\a could not be found.]"
486 "}"
487 
488 "[+SEE ALSO?\bwhence\b(1), \bgetconf\b(1)]"
489 ;
490 
491 const char sh_optdot[]	 =
492 "[-1c?@(#)$Id: \b.\b (AT&T Research) 2000-04-02 $\n]"
493 USAGE_LICENSE
494 "[+NAME?\b.\b - execute commands in the current environment]"
495 "[+DESCRIPTION?\b.\b is a special built-in command that executes commands "
496 	"from a function or a file in the current environment.]"
497 "[+?If \aname\a refers to a function defined with the \bfunction\b \aname\a "
498 	"syntax, the function executes in the current environment as "
499 	"if it had been defined with the \aname\a\b()\b syntax so that "
500 	"there is no scoping.  Otherwise, commands from the file defined "
501 	"by \aname\a are executed in the current environment.  Note that "
502 	"the complete script is read before it begins to execute so that "
503 	"any aliases defined in this script will not take effect until "
504 	"the script completes execution.]"
505 "[+?When \aname\a refers to a file, the \bPATH\b variable is searched "
506 	"for the file containing commands.  In this case execute permission "
507 	"is not required for \aname\a.]"
508 "[+?If any \aarg\as are specified, these become the positional parameters "
509 	"for the duration of the function or script and are restored "
510 	"upon completion.]"
511 "\n"
512 "\n name [arg ...]\n"
513 "\n"
514 "[+EXIT STATUS?If \aname\a is found, then the exit status is that "
515 	"of the last command executed.  Otherwise, since this is a special "
516 	"built-in, an error will cause a non-interactive shell to exit with "
517 	"a non-zero exit status.  An interactive shell returns a non-zero exit "
518 	"status to indicate an error.]"
519 
520 "[+SEE ALSO?\bcommand\b(1), \bksh\b(1)]"
521 ;
522 
523 #ifndef ECHOPRINT
524     const char sh_optecho[]	= " [-n] [arg...]";
525 #endif /* !ECHOPRINT */
526 
527 const char sh_opteval[] =
528 "[-1c?\n@(#)$Id: eval (AT&T Research) 1999-07-07 $\n]"
529 USAGE_LICENSE
530 "[+NAME?eval - create a shell command and process it]"
531 "[+DESCRIPTION?\beval\b is a shell special built-in command that constructs "
532 	"a command by concatenating the \aarg\as together, separating each "
533 	"with a space.  The resulting string is then taken as input to "
534 	"the shell and evaluated in the current environment.  Note that "
535 	"command words are expanded twice; once to construct \aarg\a, and "
536 	"again when the shell executes the constructed command.]"
537 "[+?It is not an error if \aarg\a is not given.]"
538 "\n"
539 "\n[arg...]\n"
540 "\n"
541 "[+EXIT STATUS?If \aarg\a is not specified, the exit status is \b0\b.  "
542 	"Otherwise, it is the exit status of the command defined by the "
543 	"\aarg\a operands.]"
544 "[+SEE ALSO?\bexec\b(1), \btrap\b(1), \b.\b(1)]"
545 ;
546 
547 const char sh_optexec[] =
548 "[-1c?\n@(#)$Id: exec (AT&T Research) 1999-07-10 $\n]"
549 USAGE_LICENSE
550 "[+NAME?exec - execute command, open/close and duplicate file descriptors]"
551 "[+DESCRIPTION?\bexec\b is a special built-in command that can be used to "
552 	"manipulate file descriptors or to replace the current shell "
553 	"with a new command.]"
554 "[+?If \acommand\a is specified, then the current shell process will be "
555 	"replaced by \acommand\a rather than running \acommand\a and waiting "
556 	"for it to complete.  Note that there is no need to use "
557 	"\bexec\b to enhance performance since the shell implicitly "
558 	"uses the exec mechanism internally whenever possible.]"
559 "[+?If no operands are specified, \bexec\b can be used to open or "
560 	"close files, or to manipulate file descriptors from \b0\b to "
561 	"\b9\b in the current shell environment using the standard "
562 	"redirection mechanism available with all commands.  The "
563 	"close-on-exec flags will be set on file descriptor numbers "
564 	"greater than \b2\b that are opened this way so that they "
565 	"will be closed when another program is invoked.]"
566 "[+?Because \bexec\b is a special command, any failure will cause the "
567 	"script that invokes it to exit.  This can be prevented by "
568 	"invoking \bexec\b from the \bcommand\b utility.]"
569 "[+?\bexec\b cannot be invoked from a restricted shell to create "
570 	"files or to open a file for writing or appending.]"
571 "[c?Clear all environment variables before executions except variable "
572 	"assignments that are part of the current \bexec\b command.]"
573 "[a]:[name?\bargv[0]]\b will be set to \aname\a for \acommand\a]"
574 "\n"
575 "\n[command [arg ...]]\n"
576 "\n"
577 "[+EXIT STATUS?If \acommand\a is specified, \bexec\b does not return.  "
578 	"Otherwise, the exit status is one of the following:]{"
579 	"[+0?All I/O redirections were successful.]"
580 	"[+>0?An error occurred.]"
581 "}"
582 "[+SEE ALSO?\bcommand\b(1), \beval\b(1)]"
583 ;
584 
585 
586 const char sh_optexit[] =
587 "[-1c?\n@(#)$Id: exit (AT&T Research) 1999-07-07 $\n]"
588 USAGE_LICENSE
589 "[+NAME?exit - exit the current shell]"
590 "[+DESCRIPTION?\bexit\b is shell special built-in that causes the "
591 	"shell that invokes it to exit.  Before exiting the shell, if the "
592 	"\bEXIT\b trap is set it will be invoked.]"
593 "[+?If \an\a is given, it will be used to set the exit status.]"
594 "\n"
595 "\n[n]\n"
596 "\n"
597 "[+EXIT STATUS?If \an\a is specified, the exit status is the least significant "
598 	"eight bits of the value of \an\a.  Otherwise, the exit status is the "
599 	"exit status of preceding command.  When invoked inside a trap, the "
600 	"preceding command means the command that invoked the trap.]"
601 "[+SEE ALSO?\bbreak\b(1), \breturn\b(1)]"
602 ;
603 
604 const char sh_optexport[] =
605 "[-1c?\n@(#)$Id: export (AT&T Research) 1999-07-07 $\n]"
606 USAGE_LICENSE
607 "[+NAME?export - set export attribute on variables]"
608 "[+DESCRIPTION?\bexport\b sets the export attribute on each of "
609 	"the variables specified by \aname\a which causes them "
610 	"to be in the environment of subsequently executed commands.  "
611 	"If \b=\b\avalue\a is specified, the variable \aname\a is "
612 	"set to \avalue\a.]"
613 "[+?If no \aname\as are specified then the names and values of all "
614 	"exported variables are written to standard output.]"
615 "[+?\bexport\b is built-in to the shell as a declaration command so that "
616 	"field splitting and pathname expansion are not performed on "
617 	"the arguments.  Tilde expansion occurs on \avalue\a.]"
618 "[p?Causes the output to be in the form of \bexport\b commands that can be "
619 	"used as input to the shell to recreate the current exports.]"
620 "\n"
621 "\n[name[=value]...]\n"
622 "\n"
623 "[+EXIT STATUS?]{"
624         "[+0?Successful completion.]"
625         "[+>0?An error occurred.]"
626 "}"
627 
628 "[+SEE ALSO?\bsh\b(1), \btypeset\b(1)]"
629 ;
630 
631 const char sh_optgetopts[] =
632 ":[-1c?\n@(#)$Id: getopts (AT&T Research) 2005-01-01 $\n]"
633 "[-author?Glenn Fowler <gsf@research.att.com>]"
634 USAGE_LICENSE
635 "[+NAME?\f?\f - parse utility options]"
636 "[+DESCRIPTION?The \bgetopts\b utility can be used to retrieve options and "
637   "arguments from a list of arguments given by \aargs\a or the positional "
638   "parameters if \aargs\a is omitted.  It can also generate usage messages "
639   "and a man page for the command based on the information in \aoptstring\a.]"
640 "[+?Each time it is invoked, the \bgetopts\b utility places the value "
641   "of the next option in the shell variable specified by the \aname\a "
642   "operand and the index of the next argument to be processed in the "
643   "shell variable \bOPTIND\b.  When the shell is invoked \bOPTIND\b "
644   "is initialized to \b1\b.  When an option requires or permits an option "
645   "argument, \bgetopts\b places the option argument in the shell "
646   "variable \bOPTARG\b. Otherwise \bOPTARG\b is set to \b1\b when the "
647   "option is set and \b0\b when the option is unset.]"
648 "[+?The \aoptstring\a string consists of alpha-numeric characters, "
649   "the special characters +, -, ?, :, and <space>, or character groups "
650   "enclosed in [...]].  Character groups may be nested in {...}. "
651   "Outside of a [...]] group, a single new-line followed by zero or "
652   "more blanks is ignored.  One or more blank lines separate the "
653   "options from the command argument synopsis.]"
654 "[+?Each [...]] group consists of an optional label, "
655   "optional attributes separated by :, and an "
656   "optional description string following ?.  The characters from the ? "
657   "to the end of the next ]] are ignored for option parsing and short "
658   "usage messages.  They are used for generating verbose help or man pages. "
659   "The : character may not appear in the label. "
660   "The ? character must be specified as ?? in the label and the ]] character "
661   "must be specified as ]]]] in the description string. "
662   "Text between two \\b (backspace) characters indicates "
663   "that the text should be emboldened when displayed. "
664   "Text between two \\a (bell) characters indicates that the text should "
665   "be emphasised or italicized when displayed. "
666   "Text between two \\v (vertical tab) characters indicates "
667   "that the text should displayed in a fixed width font. "
668   "Text between two \\f (formfeed) characters will be replaced by the "
669     "output from the shell function whose name is that of the enclosed text.]"
670 "[+?All output from this interface is written to the standard error.]"
671 "[+?There are several group types:]{"
672   "[+1.?A group of the form "
673     "[-[\aversion\a]][\aflag\a[\anumber\a]]]]...[?\atext\a]]]] "
674     "appearing as the first group enables the extended interface. \aversion\a "
675     "specifies the interface version, currently \b1\b. The latest version is "
676     "assumed if \aversion\a is omitted. Future enhancements "
677     "may increment \aversion\a, but all versions will be supported. \atext\a "
678     "typically specifies an SCCS or CVS identification string. Zero or more "
679     "\aflags\a with optional \anumber\a values may be specified to control "
680     "option parsing. "
681     "The flags are:]{"
682       "[+c?Cache this \aoptstring\a for multiple passes. Used to optimize "
683 	"builtins that may be called many times within the same process.]"
684       "[+i?Ignore this \aoptstring\a when generating help. Used when "
685 	"combining \aoptstring\a values from multiple passes.]"
686       "[+l?Display only \alongname\a options in help messages.]"
687       "[+o?The \b-\b option character prefix is optional (supports "
688         "obsolete \bps\b(1) option syntax.)]"
689       "[+p?\anumber\a specifies the number of \b-\b characters that must "
690 	"prefix long option names. The default is \b2\b; \b0\b, \b1\b or "
691 	"\b2\b are accepted (e.g., \bp0\b for \bdd\b(1) and \bp1\b for "
692 	"\bfind\b(1).)]"
693       "[+s?\anumber\a specifies the \b--??man\b section number, "
694         "\b1\b by default.]"
695   "}"
696   "[+2.?An option specification of the form "
697     "[\aoption\a[!]][=\anumber\a]][:\alongname\a]][?\atext\a]]]]. In this "
698     "case the first field is the option character; this is the value returned "
699     "in the \aname\a operand when the option is matched.  If there is no "
700     "option character then a two or more digit number should be specified. "
701     "This number will be returned as the value of the \aname\a operand if the "
702     "long option is matched. If \aoption\a is followed by \b!\b then the option "
703     "character sense is the inverse of the longname sense. For options that do "
704     "not take values \bOPTARG\b will be set to \b0\b for \b!\b inverted option "
705     "characters and \b1\b otherwise. =\anumber\a optionally specifies a number to "
706     "be returned in the \aname\a operand instead of the option character. A "
707     "longname is specified by \b--\b\alongname\a and is matched by the shortest "
708     "non-ambiguous prefix of all long options. * in the \alongname\a field "
709     "indicates that only characters up to that point need to match, provided "
710     "any additional characters match exactly. The enclosing [ and ]] can be "
711     "omitted for an option that does not have a longname or descriptive text.]"
712   "[+3.?An option argument specification. "
713     "Options that take arguments can be followed by : (string value) or # "
714     "(numeric value) and an option argument specification.  An option argument "
715     "specification consists of the option argument name as field 1. "
716     "The remaining \b:\b separated fields are a type name and zero or more of "
717     "the special attribute words \blistof\b, \boneof\b, and \bignorecase\b. "
718     "A default option value may be specified in the final field as "
719     "\b:=\b\adefault\a. The option argument specification may be followed "
720     "by a list of option value descriptions enclosed in braces. "
721     "A long option that takes an argument is specified as "
722     "\b--\b\alongname\a=\avalue\a. If the : or # is followed by ? then the "
723     "option argument is optional. If only the option character form is "
724     "specified then the optional argument value is not set if the next "
725     "argument starts with - or +.]"
726   "[+4.?A option value description.]"
727   "[+5.?A argument specification. A list of valid option argument values "
728     "can be specified by enclosing them inside a {...} following "
729     "the option argument specification.  Each of the permitted "
730     "values can be specified with a [...]] containing the "
731     "value followed by a description.]"
732   "[+6.?A group of the form [+\\n...]] will display the characters "
733     "representing ... in fixed with font without adding line breaks.]"
734   "[+7.?A group of the form [+\aname\a?\atext\a]] specifies a section "
735     "\aname\a with descriptive \atext\a. If \aname\a is omitted then "
736     "\atext\a is placed in a new paragraph.]"
737   "[+8.?A group of the form [-\aname\a?\atext\a]] specifies entries "
738     "for the \bIMPLEMENTATION\b section.]"
739 "}"
740 "[+?If the leading character of \aoptstring\a is +, then arguments "
741   "beginning with + will also be considered options.]"
742 "[+?A leading : character or a : following a leading + in \aoptstring\a "
743   "affects the way errors are handled.  If an option character or longname "
744   "argument not specified in \aoptstring\a is encountered when processing "
745   "options, the shell variable whose name is \aname\a will be set to the ? "
746   "character.  The shell variable \bOPTARG\b will be set to "
747   "the character found.  If an option argument is missing or has an invalid "
748   "value, then \aname\a will be set to the : character and the shell variable "
749   "\bOPTARG\b will be set to the option character found. "
750   "Without the leading :, \aname\a will be set to the ? character, \bOPTARG\b "
751   "will be unset, and an error message will be written to standard error "
752   "when errors are encountered.]"
753 "[+?The end of options occurs when:]{"
754 	"[+1.?The special argument \b--\b is encountered.]"
755 	"[+2.?An argument that does not begin with a \b-\b is encountered.]"
756 	"[+3.?A help argument is specified.]"
757 	"[+4.?An error is encountered.]"
758 "}"
759 "[+?If \bOPTIND\b is set to the value \b1\b, a new set of arguments "
760   "can be used.]"
761 "[+?\bgetopts\b can also be used to generate help messages containing command "
762   "usage and detailed descriptions.  Specify \aargs\a as:]"
763 "{ "
764 	"[+-???To generate a usage synopsis.]"
765 	"[+--?????To generate a verbose usage message.]"
766 	"[+--????man?To generate a formatted man page.]"
767 	"[+--????api?To generate an easy to parse usage message.]"
768 	"[+--????html?To generate a man page in \bhtml\b format.]"
769 	"[+--????nroff?To generate a man page in \bnroff\b format.]"
770 	"[+--????usage?List the current \aoptstring\a.]"
771 	"[+--??????\aname\a?List \bversion=\b\an\a, \an\a>0, "
772 	  "if the option \aname\a is recognized by \bgetopts\b.]"
773 "}"
774 "[+?When the end of options is encountered, \bgetopts\b exits with a "
775   "non-zero return value and the variable \bOPTIND\b is set to the "
776   "index of the first non-option argument.]"
777 "a:[name?Use \aname\a instead of the command name in usage messages.]"
778 "\n"
779 "\nopstring name [args...]\n"
780 "\n"
781 "[+EXIT STATUS]{"
782 	"[+0?An option specified was found.]"
783 	"[+1?An end of options was encountered.]"
784 	"[+2?A usage or information message was generated.]"
785 "}"
786 ;
787 
788 const char sh_optbg[] =
789 "[-1c?@(#)$Id: bg (AT&T Research) 2000-04-02 $\n]"
790 USAGE_LICENSE
791 "[+NAME?bg - resume jobs in the background]"
792 "[+DESCRIPTION?\bbg\b places the given \ajob\as into the background "
793 	"and sends them a \bCONT\b signal to start them running.]"
794 "[+?If \ajob\a is omitted, the most recently started or stopped "
795 	"background job is resumed or continued in the background.]"
796 "[+?Each \ajob\a can be specified as one of the following:]{"
797 	"[+\anumber\a?\anumber\a refers to a process id.]"
798 	"[+-\anumber\a?\anumber\a refers to a process group id.]"
799 	"[+%\anumber\a?\anumber\a refer to a job number.]"
800 	"[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
801 	"[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
802 	"[+%+ \bor\b %%?Refers to the current job.]"
803 	"[+%-?Refers to the previous job.]"
804 "}"
805 "\n"
806 "\n[job ...]\n"
807 "\n"
808 "[+EXIT STATUS?]{"
809 	"[+0?If all background jobs are started.]"
810 	"[+>0?If one more jobs does not exist or there are no background "
811 		"jobs.]"
812 "}"
813 
814 "[+SEE ALSO?\bwait\b(1), \bfg\b(1), \bdisown\b(1), \bjobs\b(1)]"
815 ;
816 
817 const char sh_optfg[] =
818 "[-1c?@(#)$Id: fg (AT&T Research) 2000-04-02 $\n]"
819 USAGE_LICENSE
820 "[+NAME?fg - move jobs to the foreground]"
821 "[+DESCRIPTION?\bfg\b places the given \ajob\as into the foreground "
822 	"in sequence and sends them a \bCONT\b signal to start each running.]"
823 "[+?If \ajob\a is omitted, the most recently started or stopped "
824 	"background job is moved to the foreground.]"
825 "[+?Each \ajob\a can be specified as one of the following:]{"
826 	"[+\anumber\a?\anumber\a refers to a process id.]"
827 	"[+-\anumber\a?\anumber\a refers to a process group id.]"
828 	"[+%\anumber\a?\anumber\a refer to a job number.]"
829 	"[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
830 	"[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
831 	"[+%+ \bor\b %%?Refers to the current job.]"
832 	"[+%-?Refers to the previous job.]"
833 "}"
834 "\n"
835 "\n[job ...]\n"
836 "\n"
837 "[+EXIT STATUS?If \bfg\b brings one or more jobs into the foreground, "
838 	"the exit status of \bfg\b  will be that of the last \ajob\a.  "
839 	"If one or more jobs does not exist or has completed, \bfg\b will "
840 	"return a non-zero exit status.]"
841 "}"
842 
843 "[+SEE ALSO?\bwait\b(1), \bbg\b(1), \bjobs\b(1)]"
844 ;
845 
846 const char sh_optdisown[] =
847 "[-1c?@(#)$Id: disown (AT&T Research) 2000-04-02 $\n]"
848 USAGE_LICENSE
849 "[+NAME?disown - disassociate a job with the current shell]"
850 "[+DESCRIPTION?\bdisown\b prevents the current shell from sending "
851 	"a \bHUP\b signal to each of the given \ajob\as when "
852 	"the current shell terminates a login session.]"
853 "[+?If \ajob\a is omitted, the most recently started or stopped "
854 	"background job is used.]"
855 "[+?Each \ajob\a can be specified as one of the following:]{"
856 	"[+\anumber\a?\anumber\a refers to a process id.]"
857 	"[+-\anumber\a?\anumber\a refers to a process group id.]"
858 	"[+%\anumber\a?\anumber\a refer to a job number.]"
859 	"[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
860 	"[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
861 	"[+%+ \bor\b %%?Refers to the current job.]"
862 	"[+%-?Refers to the previous job.]"
863 "}"
864 "\n"
865 "\n[job ...]\n"
866 "\n"
867 "[+EXIT STATUS?]{"
868 	"[+0?If all jobs are sucessfully disowned.]"
869 	"[+>0?If one more \ajob\as does not exist.]"
870 "}"
871 
872 "[+SEE ALSO?\bwait\b(1), \bbg\b(1), \bjobs\b(1)]"
873 ;
874 
875 const char sh_optjobs[] =
876 "[-1c?@(#)$Id: jobs (AT&T Research) 2000-04-02 $\n]"
877 USAGE_LICENSE
878 "[+NAME?jobs - display status of jobs]"
879 "[+DESCRIPTION?\bjobs\b displays information about specified \ajob\as "
880 	"that were started by the current shell environment on standard "
881 	"output.  The information contains the job number enclosed in "
882 	"[...]], the status, and the command line that started the job.]"
883 "[+?If \ajob\a is omitted, \bjobs\b displays the status of all stopped jobs, "
884 	"background jobs, and all jobs whose status has changed since last "
885 	"reported by the shell.]"
886 "[+?When \bjobs\b reports the termination status of a job, the "
887 	"shell removes the jobs from the list of known jobs in "
888 	"the current shell environment.]"
889 "[+?Each \ajob\a can be specified as one of the following:]{"
890 	"[+\anumber\a?\anumber\a refers to a process id.]"
891 	"[+-\anumber\a?\anumber\a refers to a process group id.]"
892 	"[+%\anumber\a?\anumber\a refer to a job number.]"
893 	"[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
894 	"[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
895 	"[+%+ \bor\b %%?Refers to the current job.]"
896 	"[+%-?Refers to the previous job.]"
897 "}"
898 "[l?\bjobs\b displays process id's after the job number in addition "
899 	"to the usual information]"
900 "[n?Only the jobs whose status has changed since the last prompt "
901 	"is displayed.]"
902 "[p?The process group leader id's for the specified jobs are displayed.]"
903 "\n"
904 "\n[job ...]\n"
905 "\n"
906 "[+EXIT STATUS?]{"
907 	"[+0?The information for each job is written to standard output.]"
908 	"[+>0?One or more jobs does not exist.]"
909 "}"
910 
911 "[+SEE ALSO?\bwait\b(1), \bps\b(1), \bfg\b(1), \bbg\b(1)]"
912 ;
913 
914 const char sh_opthist[]	=
915 "[-1c?@(#)$Id: hist (AT&T Research) 2000-04-02 $\n]"
916 USAGE_LICENSE
917 "[+NAME?\f?\f - process command history list]"
918 "[+DESCRIPTION?\b\f?\f\b lists, edits, or re-executes, commands  "
919 	"previously entered into the current shell environment.]"
920 "[+?The command history list references commands by number. The first number "
921 	"in the list is selected arbitrarily.  The relationship of a number "
922 	"to its command does not change during a login session.  When the "
923 	"number reaches 32767 the number wraps around to 1 but "
924 	"maintains the ordering.]"
925 "[+?When commands are edited (when the \b-l\b option is not specified), the "
926 	"resulting lines will be entered at the end of the history list and "
927 	"then reexecuted by the current shell.  The \b\f?\f\b command that "
928 	"caused the editing will not be entered into the history list.  If the "
929 	"editor returns a non-zero exit status, this will suppress the "
930 	"entry into the history list and the command reexecution.  Command "
931 	"line variable assignments and redirections affect both the \f?\f "
932 	"command and the commands that are reexecuted.]"
933 "[+?\afirst\a and \alast\a define the range of commands. \afirst\a and "
934 		"\alast\a can be one of the following:]{"
935 		"[+\anumber\a?A positive number representing a command "
936 			"number.  A \b+\b sign can precede \anumber\a.]"
937 		"[+-\anumber\a?A negative number representing a command "
938 			"that was executed \anumber\a commands previously. "
939 			"For example, \b-1\b is the previous command.]"
940 		"[+\astring\a?\astring\a indicates the most recently "
941 			"entered command that begins with \astring\a. "
942 			"\astring\a should not contain an \b=\b.]"
943 	"}"
944 "[+?If \afirst\a is omitted, the previous command is used, unless \b-l\b "
945 	"is specified, in which case it will default to \b-16\b and \alast\a "
946 	"will default to \b-1\b.]"
947 "[+?If \afirst\a is specified and \alast\a is omitted, then \alast\a will "
948 	"default to \afirst\a unless \b-l\b is specified in which case "
949 	"it will default to \b-1\b.]"
950 "[+?If no editor is specified, then the editor specfied by the \bHISTEDIT\b "
951 	"variable will be used if set, or the \bFCEDIT\b variable will be "
952 	"used if set, otherwise, \bed\b will be used.]"
953 "[e]:[editor?\aeditor\a specifies the editor to use to edit the history "
954 	"command.   A value of \b-\b for \aeditor\a is equivalent to "
955 	"specifiying the \b-s\b option.]"
956 "[l?List the commands rather than editing and reexecuting them.]"
957 "[N]#[num?Start at \anum\a commands back.]"
958 "[n?Suppress the command numbers when the commands are listed.]"
959 #if SHOPT_HISTEXPAND
960 "[p?Writes the result of history expansion for each operand to standard "
961 	"output.  All other options are ignored.]"
962 #endif
963 "[r?Reverse the order of the commands.]"
964 "[s?Reexecute the command without invoking an editor.  In this case "
965 	"an operand of the form \aold\a\b=\b\anew\a can be specified "
966 	"to change the first occurrence of the string \aold\a in the "
967 	"command to \anew\a before reexecuting the command.]"
968 
969 "\n"
970 "\n[first [last] ]\n"
971 "\n"
972 "[+EXIT STATUS?If a command is reexecuted, the exit status is that of "
973 	"the command that gets reexecuted.  Otherwise, it is one of the "
974 	"following:]{"
975 	"[+0?Successfully completion of the listing.]"
976 	"[+>0?An error occurred.]"
977 "}"
978 
979 "[+SEE ALSO?\bksh\b(1), \bsh\b(1), \bed\b(1)]"
980 ;
981 
982 const char sh_optkill[]	 =
983 "[-1c?\n@(#)$Id: kill (AT&T Research) 1999-06-17 $\n]"
984 USAGE_LICENSE
985 "[+NAME?kill - terminate or signal process]"
986 "[+DESCRIPTION?With the first form in which \b-l\b is not specified, "
987 	"\bkill\b sends a signal to one or more processes specified by "
988 	"\ajob\a.  This normally terminates the processes unless the signal "
989 	"is being caught or ignored.]"
990 "[+?A \ajob\a can be specified as one of the following:]{"
991 	"[+\anumber\a?\anumber\a refers to a process id.]"
992 	"[+-\anumber\a?\anumber\a refers to a process group id.]"
993 	"[+%\anumber\a?\anumber\a refer to a job number.]"
994 	"[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
995 	"[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
996 	"[+%+ \bor\b %%?Refers to the current job.]"
997 	"[+%-?Refers to the previous job.]"
998 "}"
999 "[+?If the signal is not specified with either the \b-n\b or the \b-s\b  "
1000 	"option, the \bSIGTERM\b signal is used.]"
1001 "[+?If \b-l\b is specified, and no \aarg\a is specified, then \bkill\b "
1002 	"writes the list of signals to standard output.  Otherwise, \aarg\a "
1003 	"can be either a signal name, or a number representing either a "
1004 	"signal number or exit status for a process that was terminated "
1005 	"due to a signal.  If a name is given the corresponding signal "
1006 	"number will be written to standard output.  If a number is given "
1007 	"the corresponding signal name will be written to standard output.]"
1008 "[l?List signal names or signal numbers rather than sending signals as "
1009 	"described above.  "
1010 	"The \b-n\b and \b-s\b options cannot be specified.]"
1011 "[n]#[signum?Specify a signal number to send.  Signal numbers are not "
1012 	"portable across platforms, except for the following:]{"
1013 		"[+0?No signal]"
1014 		"[+1?\bHUP\b]"
1015 		"[+2?\bINT\b]"
1016 		"[+3?\bQUIT\b]"
1017 		"[+6?\bABRT\b]"
1018 		"[+9?\bKILL\b]"
1019 		"[+14?\bALRM\b]"
1020 		"[+15?\bTERM\b]"
1021 	"}"
1022 "[s]:[signame?Specify a signal name to send.  The signal names are derived "
1023 	"from their names in \b<signal.h>\b without the \bSIG\b prefix and "
1024 	"are case insensitive.  \bkill -l\b will generate the list of "
1025 	"signals on the current platform.]"
1026 "\n"
1027 "\njob ...\n"
1028 " -l [arg ...]\n"
1029 "\n"
1030 "[+EXIT STATUS?]{"
1031 	"[+0?At least one matching process was found for each \ajob\a "
1032 	"operand, and the specified signal was successfully sent to at "
1033 	"least one matching process.]"
1034 	"[+>0?An error occurred.]"
1035 "}"
1036 "[+SEE ALSO?\bps\b(1), \bjobs\b(1), \bkill\b(2), \bsignal\b(2)]"
1037 ;
1038 
1039 const char sh_optlet[]	=
1040 "[-1c?@(#)$Id: let (AT&T Research) 2000-04-02 $\n]"
1041 USAGE_LICENSE
1042 "[+NAME?let - evaluate arithmetic expressions]"
1043 "[+DESCRIPTION?\blet\b evaluates each \aexpr\a in the current "
1044 	"shell environment as an arithmetic expression using ANSI C "
1045 	"syntax.  Variables names are shell variables and they "
1046 	"are recursively evaluated as arithmetic expressions to "
1047 	"get numerical values.]"
1048 "[+?\blet\b has been made obsolete by the \b((\b...\b))\b syntax "
1049 	"of \bksh\b(1) which does not require quoting of the operators "
1050 	"to pass them as command arguments.]"
1051 "\n"
1052 "\n[expr ...]\n"
1053 "\n"
1054 "[+EXIT STATUS?]{"
1055 	"[+0?The last \aexpr\a evaluates to a non-zero value.]"
1056 	"[+>0?The last \aexpr\a evaluates to \b0\b or an error occurred.]"
1057 "}"
1058 
1059 "[+SEE ALSO?\bexpr\b(1), \btest\b(1), \bksh\b(1)]"
1060 ;
1061 
1062 const char sh_optprint[] =
1063 "[-1c?\n@(#)$Id: print (AT&T Research) 1999-04-07 $\n]"
1064 USAGE_LICENSE
1065 "[+NAME?print - write arguments to standard output]"
1066 "[+DESCRIPTION?By default, \bprint\b writes each \astring\a operand to "
1067 	"standard output and appends a newline character.]"
1068 "[+?Unless, the \b-r\b or \b-f\b option is specifed, each \b\\\b "
1069 	"character in each \astring\a operand is processed specially as "
1070 	"follows:]{"
1071 		"[+\\a?Alert character.]"
1072 		"[+\\b?Backspace character.]"
1073 		"[+\\c?Terminate output without appending newline.  The "
1074 			"remaining \astring\a operands are ignored.]"
1075 		"[+\\f?Formfeed character.]"
1076 		"[+\\n?Newline character.]"
1077 		"[+\\t?Tab character.]"
1078 		"[+\\v?Vertical tab character.]"
1079 		"[+\\\\?Backslash character.]"
1080 		"[+\\E?Escape character (ASCII octal 033).]"
1081 		"[+\\0\ax\a?The 8-bit character whose ASCII code is the "
1082 			"1-, 2-, or 3-digit octal number \ax\a.]"
1083 	"}"
1084 "[+?If both \b-e\b and \b-r\b are specified, the last one specified is "
1085 	"the one that is used.]"
1086 "[+?When the \b-f\b option is specified and there are more \astring\a "
1087 	"operands than format specifiers, the format string is "
1088 	"reprocessed from the beginning.  If there are fewer \astring\a "
1089 	"operands than format specifiers, then outputting will end "
1090 	"at the first unneeded format specifier.]"
1091 "[e?Unless \b-f\b is specified, process \b\\\b sequences in each \astring\a "
1092 	"operand as described above. This is the default behavior.]"
1093 "[n?Do not append a new-line character to the output.]"
1094 "[f]:[format?Write the \astring\a arguments using the format string "
1095 	"\aformat\a and do not append a new-line.  See \bprintf\b for "
1096 	"details on how to specify \aformat\a.]"
1097 "[p?Write to the current co-process instead of standard output.]"
1098 "[r?Do not process \b\\\b sequences in each \astring\a operand as described "
1099 	"above.]"
1100 "[s?Write the output as an entry in the shell history file instead of "
1101 	"standard output.]"
1102 "[u]:[fd:=1?Write to file descriptor number \afd\a instead of standard output.]"
1103 "\n"
1104 "\n[string ...]\n"
1105 "\n"
1106 "[+EXIT STATUS?]{"
1107 	"[+0?Successful completion.]"
1108 	"[+>0?An error occurred.]"
1109 "}"
1110 "[+SEE ALSO?\becho\b(1), \bprintf\b(1), \bread\b(1)]"
1111 ;
1112 
1113 const char sh_optprintf[] =
1114 "[-1c?\n@(#)$Id: printf (AT&T Research) 2006-10-26 $\n]"
1115 USAGE_LICENSE
1116 "[+NAME?printf - write formatted output]"
1117 "[+DESCRIPTION?\bprintf\b writes each \astring\a operand to "
1118 	"standard output using \aformat\a to control the output format.]"
1119 "[+?The \aformat\a operands supports the full range of ANSI C formatting "
1120 	"specifiers plus the following additional specifiers:]{"
1121 	"[+%b?Each character in the \astring\a operand is processed "
1122 		"specially as follows:]{"
1123 			"[+\\a?Alert character.]"
1124 			"[+\\b?Backspace character.]"
1125 			"[+\\c?Terminate output without appending newline. "
1126 			    "The remaining \astring\a operands are ignored.]"
1127 			"[+\\f?Formfeed character.]"
1128 			"[+\\n?Newline character.]"
1129 			"[+\\t?Tab character.]"
1130 			"[+\\v?Vertical tab character.]"
1131 			"[+\\\\?Backslash character.]"
1132 			"[+\\E?Escape character (ASCII octal 033).]"
1133 			"[+\\0\ax\a?The 8-bit character whose ASCII code is "
1134 				"the 1-, 2-, or 3-digit octal number \ax\a.]"
1135 		"}"
1136 	"[+%q?Output \astring\a quoted in a manner that it can be read in "
1137 		"by the shell to get back the same string.  However, empty "
1138 		"strings resulting from missing \astring\a operands will "
1139 		"not be quoted.]"
1140 	"[+%B?Treat the argument as a variable name and output the value "
1141 		"without converting it to a string.  This is most useful for "
1142 		"variables of type \b-b\b.]"
1143 	"[+%H?Output \astring\a with characters \b<\b, \b&\b, \b>\b, "
1144 		"\b\"\b, and non-printable characters properly escaped for "
1145 		"use in HTML and XML documents.]"
1146 	"[+%P?Treat \astring\a as an extended regular expression and  "
1147 		"convert it to a shell pattern.]"
1148 	"[+%R?Treat \astring\a as an shell pattern expression and  "
1149 		"convert it to an extended regular expression.]"
1150 	"[+%T?Treat \astring\a as a date/time string and format it.  The "
1151 		"\bT\b can be preceded by \b(\b\adformat\a\b)\b, where "
1152 		"\adformat\a is a date format as defined by the \bdate\b "
1153 		"command.]"
1154 	"[+%Z?Output a byte whose value is \b0\b.]"
1155 "}"
1156 "[+?When performing conversions of \astring\a to satisfy a numeric "
1157 	"format specifier, if the first character of \astring\a "
1158 	"is \b\"\b or \b'\b, then the value will be the numeric value "
1159 	"in the underlying code set of the character following the "
1160 	"\b\"\b or \b'\b.  Otherwise, \astring\a is treated like a shell "
1161 	"arithmetic expression and evaluated.]"
1162 "[+?If a \astring\a operand cannot be completed converted into a value "
1163 	"appropriate for that format specifier, an error will occur, "
1164 	"but remaining \astring\a operands will continue to be processed.]"
1165 "[+?In addition to the format specifier extensions, the following "
1166 	"extensions of ANSI-C are permitted in format specifiers:]{"
1167 	"[+-?The escape sequences \b\\E\b and \b\\e\b expand to the escape "
1168 		"character which is octal \b033\b in ASCII.]"
1169 	"[+-?The escape sequence \b\\c\b\ax\a expands to Control-\ax\a.]"
1170 	"[+-?The escape sequence \b\\C[.\b\aname\a\b.]]\b expands to "
1171 		"the collating element \aname\a.]"
1172 	"[+-?The escape sequence \b\\x{\b\ahex\a\b}\b expands to the "
1173 		"character corresponding to the hexidecimal value \ahex\a.]"
1174 	"[+-?The format modifier flag \b=\b can be used to center a field to "
1175 		"a specified width.  When the output is a terminal, the "
1176 		"character width is used rather than the number of bytes.]"
1177 	"[+-?Each of the integral format specifiers can have a third "
1178 		"modifier after width and precision that specifies the "
1179 		"base of the conversion from 2 to 64.  In this case the "
1180 		"\b#\b modifier will cause \abase\a\b#\b to be prepended to "
1181 		"the value.]"
1182 	"[+-?The \b#\b modifier can be used with the \bd\b specifier when "
1183 		"no base is specified cause the output to be written in units "
1184 		"of \b1000\b with a suffix of one of \bk M G T P E\b.]"
1185 	"[+-?The \b#\b modifier can be used with the \bi\b specifier to "
1186 		"cause the output to be written in units of \b1024\b with "
1187 		"a suffix of one of \bKi Mi Gi Ti Pi Ei\b.]"
1188 	"}"
1189 "[+?If there are more \astring\a operands than format specifiers, the "
1190 	"\aformat\a string is reprocessed from the beginning.  If there are "
1191 	"fewer \astring\a operands than format specifiers, then string "
1192 	"specifiers will be treated as if empty strings were supplied, "
1193 	"numeric conversions will be treated as if 0 were supplied, and "
1194 	"time conversions will be treated as if \bnow\b were supplied.]"
1195 "[+?\bprintf\b is equivalent to \bprint -f\b which allows additional "
1196 	"options to be specified.]"
1197 "\n"
1198 "\nformat [string ...]\n"
1199 "\n"
1200 "[+EXIT STATUS?]{"
1201 	"[+0?Successful completion.]"
1202 	"[+>0?An error occurred.]"
1203 "}"
1204 "[+SEE ALSO?\bdate\b(1), \bprint\b(1), \bread\b(1)]"
1205 ;
1206 
1207 const char sh_optpwd[] =
1208 "[-1c?\n@(#)$Id: pwd (AT&T Research) 1999-06-07 $\n]"
1209 USAGE_LICENSE
1210 "[+NAME?pwd - write working directory name]"
1211 "[+DESCRIPTION?\bpwd\b writes an absolute pathname of the current working "
1212 	"directory to standard output.   An absolute pathname is a "
1213 	"pathname that begins with \b/\b that does not contains any "
1214 	"\b.\b  or \b..\b components.]"
1215 "[+?If both \b-L\b and \b-P\b are specified, the last one specified will "
1216 	"be used.  If neither \b-P\b or \b-L\b is specified then the "
1217 	"behavior will be determined by the \bgetconf\b parameter "
1218 	"\bPATH_RESOLVE\b.  If \bPATH_RESOLVE\b is \bphysical\b, "
1219 	"then the behavior will be as if \b-P\b were specified.  Otherwise, "
1220 	"the behavior will be as if  \b-L\b were specified.]"
1221 "[L?The absolute pathname may contains symbolic link components.  This is "
1222 	"the default.]"
1223 "[P?The absolute pathname will not contain any symbolic link components.]"
1224 "[+EXIT STATUS?]{"
1225 	"[+0?Successful completion.]"
1226 	"[+>0?An error occurred.]"
1227 "}"
1228 "[+SEE ALSO?\bcd\b(1), \bgetconf\b(1)]"
1229 ;
1230 
1231 const char sh_optread[] =
1232 "[-1c?\n@(#)$Id: read (AT&T Research) 2006-12-19 $\n]"
1233 USAGE_LICENSE
1234 "[+NAME?read - read a line from standard input]"
1235 "[+DESCRIPTION?\bread\b reads a line from standard input and breaks it "
1236 	"into fields using the characters in value of the \bIFS\b variable "
1237 	"as separators.  The escape character, \b\\\b, is used to remove "
1238 	"any special meaning for the next character and for line continuation "
1239 	"unless the \b-r\b option is specified.]"
1240 "[+?If there are more variables than fields, the remaining variables are "
1241 	"set to empty strings.  If there are fewer variables than fields, "
1242 	"the leftover fields and their intervening separators are assigned "
1243 	"to the last variable.  If no \avar\a is specifed then the variable "
1244 	"\bREPLY\b is used.]"
1245 "[+?When \avar\a has the binary attribute and \b-n\b or \b-N\b is specified, "
1246 	"the bytes that are read are stored directly into \bvar\b.]"
1247 "[+?If you specify \b?\b\aprompt\a after the first \avar\a, then \bread\b "
1248 	"will display \aprompt\a on standard error when standard input "
1249 	"is a terminal or pipe.]"
1250 "[A?Unset \avar\a and then create an indexed array containing each field in "
1251 	"the line starting at index 0.]"
1252 "[d]:[delim?Read until delimiter \adelim\a instead of to the end of line.]"
1253 "[p?Read from the current co-process instead of standard input.  An end of "
1254 	"file causes \bread\b to disconnect the co-process so that another "
1255 	"can be created.]"
1256 "[r?Do not treat \b\\\b specially when processing the input line.]"
1257 "[s?Save a copy of the input as an entry in the shell history file.]"
1258 "[u]#[fd:=0?Read from file descriptor number \afd\a instead of standard input.]"
1259 "[t]:[timeout?Specify a timeout \atimeout\a in seconds when reading from "
1260 	"a terminal or pipe.]"
1261 "[n]#[nbyte?Read at most \ansize\a characters.  For binary fields \asize\a "
1262 	"will be in bytes.]"
1263 "[N]#[nbyte?Read exactly \ansize\a characters.  For binary fields \asize\a "
1264 	"will be in bytes.]"
1265 "[v?When reading from a terminal the value of the first variable is displayed "
1266 	"and used as a default value.]"
1267 "\n"
1268 "\n[var?prompt] [var ...]\n"
1269 "\n"
1270 "[+EXIT STATUS?]{"
1271 	"[+0? Successful completion.]"
1272 	"[+>0?End of file was detected or an error occurred.]"
1273 "}"
1274 "[+SEE ALSO?\bprint\b(1), \bprintf\b(1), \bcat\b(1)]"
1275 ;
1276 
1277 const char sh_optreadonly[] =
1278 "[-1c?\n@(#)$Id: readonly (AT&T Research) 1999-07-07 $\n]"
1279 USAGE_LICENSE
1280 "[+NAME?readonly - set readonly attribute on variables]"
1281 "[+DESCRIPTION?\breadonly\b sets the readonly attribute on each of "
1282 	"the variables specified by \aname\a which prevents their "
1283 	"values from being changed.  If \b=\b\avalue\a is specified, "
1284 	"the variable \aname\a is set to \avalue\a before the variable "
1285 	"is made readonly.]"
1286 "[+?If no \aname\as are specified then the names and values of all "
1287 	"readonly variables are written to standard output.]"
1288 "[+?\breadonly\b is built-in to the shell as a declaration command so that "
1289 	"field splitting and pathname expansion are not performed on "
1290 	"the arguments.  Tilde expansion occurs on \avalue\a.]"
1291 "[p?Causes the output to be in a form of \breadonly\b commands that can be "
1292 	"used as input to the shell to recreate the current set of "
1293 	"readonly variables.]"
1294 "\n"
1295 "\n[name[=value]...]\n"
1296 "\n"
1297 "[+EXIT STATUS?]{"
1298         "[+0?Successful completion.]"
1299         "[+>0?An error occurred.]"
1300 "}"
1301 
1302 "[+SEE ALSO?\bsh\b(1), \btypeset\b(1)]"
1303 ;
1304 
1305 const char sh_optreturn[] =
1306 "[-1c?\n@(#)$Id: return (AT&T Research) 1999-07-07 $\n]"
1307 USAGE_LICENSE
1308 "[+NAME?return - return from a function or dot script ]"
1309 "[+DESCRIPTION?\breturn\b is a shell special built-in that causes the "
1310 	"function or dot script that invokes it to exit.  "
1311 	"If \breturn\b is invoked outside of a function or dot script "
1312 	"it is equivalent to \bexit\b.]"
1313 "[+?If \breturn\b is invoked inside a function defined with the \bfunction\b "
1314 	"reserved word syntax, then any \bEXIT\b trap set within the "
1315 	"then function will be invoked in the context of the caller "
1316 	"before the function returns.]"
1317 "[+?If \an\a is given, it will be used to set the exit status.]"
1318 "\n"
1319 "\n[n]\n"
1320 "\n"
1321 "[+EXIT STATUS?If \an\a is specified, the exit status is the least significant "
1322 	"eight bits of the value of \an\a.  Otherwise, the exit status is the "
1323 	"exit status of preceding command.]"
1324 "[+SEE ALSO?\bbreak\b(1), \bexit\b(1)]"
1325 ;
1326 
1327 
1328 const char sh_optksh[] =
1329 "+[-1c?\n@(#)$Id: sh (AT&T Research) "SH_RELEASE" $\n]"
1330 USAGE_LICENSE
1331 "[+NAME?\b\f?\f\b - Shell, the standard command language interpreter]"
1332 "[+DESCRIPTION?\b\f?\f\b is a command language interpreter that "
1333 	"executes commands read from a command line string, the "
1334 	"standard input, or a specified file.]"
1335 "[+?If the \b-i\b option is present, or there are no \aarg\as and "
1336 	"the standard input and standard error are attached to a "
1337 	"terminal, the shell is considered to be interactive.]"
1338 "[+?The \b-s\b and \b-c\b options are mutually exclusive.  If the \b-c\b "
1339 	"option is specified, the first \aarg\a is the command-line string "
1340 	"and must be specified.  Any remaining \aarg\as will be used "
1341 	"to initialize \b$0\b and positional parameters.]"
1342 "[+?If the neither \b-s\b nor \b-c\b is specified, then the first \barg\b "
1343 	"will be the pathname of the file containing commands and \b$0\b "
1344 	"will be set to this value.  If there is no file with this pathname, "
1345 	"and this pathame does not contain a \b/\b, then the \bPATH\b "
1346 	"will be searched for an executable with this name.  Any remaining "
1347 	"\aarg\as will be used to initialize the positional parmaeters.]"
1348 "[+?Any option can use a \b+\b instead of a \b-\b to disable the corresponding "
1349 	"option.]"
1350 "[c?Read the commands from the first \aarg\a.]"
1351 "[i?Specifies that the shell is interactive.]"
1352 "[l?Invoke the shell as a login shell; \b/etc/profile\b and \b$HOME/.profile\b, "
1353 	"if they exist, are read before the first command.]"
1354 "[r\f:restricted\f?Invoke the shell in a restricted mode.  A restricted "
1355 	"shell does not permit any of the following:]{"
1356 	"[+-?Changing the working directory.]"
1357 	"[+-?Setting values or attributes of the variables \bSHELL\b, "
1358 		"\bENV\b, \bFPATH\b, or \bPATH\b.]"
1359 	"[+-?Executing any command whose name as a \b/\b in it.]"
1360 	"[+-?Redirecting output of a command with \b>\b, \b>|\b, "
1361 		"\b<>\b, or \b>>\b.]"
1362 	"[+-?Adding or deleting built-in commands or libraries with "
1363 		"\bbuiltin\b.]"
1364 	"[+-?Executing \bcommand -p\b \a...\a .]"
1365 	"}"
1366 "[s?Read the commands from standard input.  The positional parameters will be "
1367 	"initialized from \aarg\a.]"
1368 "[D\f:dump-strings\f?Do not execute the script, but output the set of double "
1369 	"quoted strings preceded by a \b$\b.  These strings are needed for "
1370 	"localization of the script to different locales.]"
1371 "[E?Reads the file \b${ENV-$HOME/.kshrc}\b, if it exists, as a profile. "
1372 	"On by default for interactive shells; use \b+E\b to disable.]"
1373 #if SHOPT_PFSH
1374 "[P?Invoke the shell as a profile shell.  See \bpfexec\b(1).]"
1375 #endif
1376 #if SHOPT_KIA
1377 "[R]:[file?Do not execute the script, but create a cross reference database "
1378 	"in \afile\a that can be used a separate shell script browser.]"
1379 #endif /* SHOPT_KIA */
1380 #if SHOPT_BASH
1381    "\fbash2\f"
1382 #endif
1383 "\fabc\f"
1384 "\n"
1385 "\n[arg ...]\n"
1386 "\n"
1387 "[+EXIT STATUS?If \b\f?\f\b executes command, the exit status will be that "
1388         "of the last command executed.  Otherwise, it will be one of "
1389         "the following:]{"
1390         "[+0?The script or command line to be executed consists entirely "
1391 		"of zero or more blank lines or comments.]"
1392         "[+>1-125?A noninteractive shell detected a syntax error, a variable "
1393 		"assignment error, or an error in a special built-in.]"
1394 	"[+126?\b-c\b and \b-s\b were not specified and the command script "
1395 		"was found on \bPATH\b but was not executable.]"
1396 	"[+127?\b-c\b and \b-s\b were not specified and the command script "
1397 		"corresponding to \aarg\a could not be found.]"
1398 "}"
1399 
1400 "[+SEE ALSO?\bset\b(1), \bbuiltin\b(1)]"
1401 ;
1402 const char sh_optset[] =
1403 "+[-1c?\n@(#)$Id: set (AT&T Research) 1999-09-28 $\n]"
1404 USAGE_LICENSE
1405 "[+NAME?set - set/unset options and positional parameters]"
1406 "[+DESCRIPTION?\bset\b sets or unsets options and positional parameters.  "
1407 	"Options that are specified with a \b-\b cause the options to "
1408 	"be set.  Options that are specified with a \b+\b cause the "
1409 	"option to be unset.]"
1410 "[+?\bset\b without any options or arguments displays the names and "
1411 	"values of all shell variables in the order of the collation "
1412 	"sequence in the current locale.  The values are quoted so that "
1413 	"they are suitable for reinput to the shell.]"
1414 "[+?If no \aarg\as are specified, not even the end of options argument \b--\b, "
1415 	"the positional parameters are unchanged.  Otherwise, unless "
1416 	"the \b-A\b options has been specified, the positional parameters "
1417 	"are replaced by the list of \aarg\as.  A first \aarg\a of "
1418 	"\b--\b is ignored when setting positional parameters.]"
1419 "[+?For backward compatibility, a \bset\b command without any options "
1420 	"specified whose first \aarg\a is \b-\b will turn off "
1421 	"the \b-v\b and \b-x\b options.  If any additional \aarg\as "
1422 	"are specified, they will replace the positional parameters.]"
1423 "[s?Sort the positional parameters.]"
1424 "[A]:[name?Assign the arguments sequentially to the array named by \aname\a "
1425 	"starting at subscript 0 rather than to the positional parameters.]"
1426 "\fabc\f"
1427 "\n"
1428 "\n[arg ...]\n"
1429 "\n"
1430 "[+EXIT STATUS?]{"
1431         "[+0?No errors occurred.]"
1432         "[+>0?An error occurred.]"
1433 "}"
1434 
1435 "[+SEE ALSO?\btypeset\b(1), \bshift\b(1)]"
1436 ;
1437 
1438 
1439 
1440 const char sh_optshift[] =
1441 "[-1c?\n@(#)$Id: shift (AT&T Research) 1999-07-07 $\n]"
1442 USAGE_LICENSE
1443 "[+NAME?shift - shift positional parameters]"
1444 "[+DESCRIPTION?\bshift\b is a shell special built-in that shifts the "
1445 	"positional parameters to the left by the number of places "
1446 	"defined by \an\a, or \b1\b if \an\a is omitted.  The number of "
1447 	"positional parameters remaining will be reduced by the "
1448 	"number of places that are shifted.]"
1449 "[+?If \an\a is given, it will be evaluated as an arithmetic expression "
1450 	"to determinate the number of places to shift.  It is an error "
1451 	"to shift more than the number of positional parameters or a "
1452 	"negative number of places.]"
1453 "\n"
1454 "\n[n]\n"
1455 "\n"
1456 "[+EXIT STATUS?]{"
1457         "[+0?The positional parameters were successfully shifted.]"
1458         "[+>0?An error occurred.]"
1459 "}"
1460 "[+SEE ALSO?\bset\b(1)]"
1461 ;
1462 
1463 const char sh_optsleep[] =
1464 "[-1c?\n@(#)$Id: sleep (AT&T Research) 1999-04-07 $\n]"
1465 USAGE_LICENSE
1466 "[+NAME?sleep - suspend execution for an interval]"
1467 "[+DESCRIPTION?\bsleep\b suspends execution for at least the time specified "
1468 	"by \aseconds\a or until a \bSIGALRM\b signal is received.  "
1469 	"\aseconds\a can be specifed as a floating point number but the "
1470 	"actual granularity depends on the underlying system, normally "
1471 	"around 1 millisecond.]"
1472 "\n"
1473 "\nseconds\n"
1474 "\n"
1475 "[+EXIT STATUS?]{"
1476 	"[+0?The execution was successfully suspended for at least \atime\a "
1477 	"seconds, or a \bSIGALRM\b signal was received.]"
1478 	"[+>0?An error occurred.]"
1479 "}"
1480 "[+SEE ALSO?\btime\b(1), \bwait\b(1)]"
1481 ;
1482 
1483 const char sh_opttrap[] =
1484 "[-1c?\n@(#)$Id: trap (AT&T Research) 1999-07-17 $\n]"
1485 USAGE_LICENSE
1486 "[+NAME?trap - trap signals and conditions]"
1487 "[+DESCRIPTION?\btrap\b is a special built-in that defines actions to be "
1488 	"taken when conditions such as receiving a signal occur.  Also, "
1489 	"\btrap\b can be used to display the current trap settings on "
1490 	"standard output.]"
1491 "[+?If \aaction\a is \b-\b, \btrap\b resets each \acondition\a "
1492 	"to the default value.  If \aaction\a is an empty string, the "
1493 	"shell ignores each of the \acondition\as if they arise. "
1494 	"Otherwise, the argument \aaction\a will be read and executed "
1495 	"by the shell as if it were processed by \beval\b(1) when one "
1496 	"of the corresponding conditions arise.  The action of the trap "
1497 	"will override any previous action associated with each specified "
1498 	"\acondition\a.  The value of \b$?\b is not altered by the trap "
1499 	"execution.]"
1500 "[+?\acondition\a can be the name or number of a signal, or one of the "
1501 	"following:]{"
1502 	"[+EXIT?This trap is executed when the shell exits.  If defined "
1503 		"within a function defined with the \bfunction\b reserved "
1504 		"word, the trap is executed in the caller's environment "
1505 		"when the function returns and the trap action is restored "
1506 		"to the value it had when it called the function.]"
1507 	"[+0?Same as EXIT.]"
1508 	"[+DEBUG?Executed before each simple command is executed but after "
1509 		"the arguments are expanded.]"
1510 	"[+ERR?Executed whenever \bset -e\b would cause the shell to exit.]"
1511 	"[+KEYBD?Executed when a key is entered from a terminal device.]"
1512 "}"
1513 "[+?Signal names are case insensitive and the \bsig\b prefix is optional.  "
1514 	"Signals that were ignored on entry to a noninteractive shell cannot "
1515 	"trapped or reset although doing so will not report an error.  The "
1516 	"use of signal numbers other than \b1\b, \b2\b, \b3\b, \b6\b, "
1517 	"\b9\b, \b14\b, and \b15\b is not portable.]"
1518 "[+?Although \btrap\b is a special built-in, specifying a condition that "
1519 	"the shell does not know about causes \btrap\b to exit with a "
1520 	"non-zero exit status, but does not terminate the invoking shell.]"
1521 "[+?If no \aaction\a or \acondition\as are specified then all the current "
1522 	"trap settings are written to standard output.]"
1523 "[p?Causes the current traps to be output in a format that can be processed "
1524 	"as input to the shell to recreate the current traps.]"
1525 "\n"
1526 "\n[action condition ...]\n"
1527 "\n"
1528 "[+EXIT STATUS?]{"
1529         "[+0?Successful completion.]"
1530         "[+>0?An error occurred.]"
1531 "}"
1532 
1533 "[+SEE ALSO?\bkill\b(1), \beval\b(1), \bsignal\b(3)]"
1534 ;
1535 
1536 const char sh_opttypeset[] =
1537 "+[-1c?\n@(#)$Id: typeset (AT&T Research) 2003-01-15 $\n]"
1538 USAGE_LICENSE
1539 "[+NAME?\f?\f - declare or display variables with attributes]"
1540 "[+DESCRIPTION?Without the \b-f\b option, \b\f?\f\b sets, unsets, "
1541 	"or displays attributes of variables as specified with the "
1542 	"options.  If the first option is specified with a \b-\b "
1543 	"then the attributes are set for each of the given \aname\as. "
1544 	"If the first option is specified with a \b+\b, then the specified "
1545 	"attributes are unset.  If \b=\b\avalue\a is specified value is "
1546 	"assigned before the attributes are set.]"
1547 "[+?When \b\f?\f\b is called inside a function defined with the "
1548 	"\bfunction\b reserved word, and \aname\a does not contain a "
1549 	"\b.\b, then a local variable statically scoped to  that function "
1550 	"will be created.]"
1551 "[+?Not all option combinations are possible.  For example, the numeric "
1552 	"options \b-i\b, \b-E\b, and \b-F\b cannot be specified with "
1553 	"the justification options \b-L\b, \b-R\b, and \b-Z\b.]"
1554 "[+?Note that the following preset aliases are set by the shell:]{"
1555 	"[+float?\b\f?\f -E\b.]"
1556 	"[+functions?\b\f?\f -f\b.]"
1557 	"[+integer?\b\f?\f -i\b.]"
1558 	"[+nameref?\b\f?\f -n\b.]"
1559 "}"
1560 "[+?If no \aname\as are specified then variables that have the specified "
1561 	"options are displayed.  If the first option is specified with "
1562 	"a leading \b-\b then the name and value of each variable is "
1563 	"written to standard output.  Otherwise, only the names are "
1564 	"written.  If no options are specified or just \b-p\b is "
1565 	"specified, then the names and attributes of all variables that have "
1566 	"attributes are written to standard output.  When \b-f\b is specified, "
1567 	"the names displayed will be function names.]"
1568 "[+?If \b-f\b is specified, then each \aname\a refers to a function "
1569 	"and the only valid options are \b-u\b and \b-t\b.  In this "
1570 	"case no \b=\b\avalue\a can be specified.]"
1571 "[+?\b\f?\f\b is built-in to the shell as a declaration command so that "
1572 	"field splitting and pathname expansion are not performed on "
1573 	"the arguments.  Tilde expansion occurs on \avalue\a.]"
1574 #if SHOPT_BASH
1575 "[a?Ignored, used for bash compatibility.]"
1576 #endif
1577 "[a?Indexed array. this is the default.]"
1578 "[b?Each \aname\a may contain binary data.  Its value is the mime "
1579 	"base64 encoding of the data. It can be used with \b-Z\b, "
1580 	"to specify fixed sized fields.]"
1581 "[f?Each of the options and \aname\as refers to a function.]"
1582 "[i]#?[base:=10?An integer. \abase\a represents the arithmetic base "
1583 	"from 2 to 64.]"
1584 "[l?Convert uppercase character to lowercase.  Unsets \b-u\b attribute.  When "
1585 	"used with \b-i\b, \b-E\b, or \b-F\b indicates long variant.]"
1586 "[n?Name reference.  The value is the name of a variable that \aname\a "
1587 	"references.  \aname\a cannot contain a \b.\b.]"
1588 "[p?Causes the output to be in a format that can be used as input to the "
1589 	"shell to recreate the attributes for variables.]"
1590 "[r?Enables readonly.  Once enabled it cannot be disabled.  See "
1591 	"\breadonly\b(1).]"
1592 "[s?Used with \b-i\b to restrict integer size to short.]"
1593 "[t?When used with \b-f\b, enables tracing for each of the specified "
1594 	"functions.  Otherwise, \b-t\b is a user defined attribute and "
1595 	"has no meaning to the shell.]"
1596 "[u?Without \b-f\b or \b-i\b, converts lowercase character to uppercase "
1597 	"and unsets \b-l\b.  With \b-f\b specifies that \aname\a is a function "
1598 	"that hasn't been loaded yet.  With \b-i\b specifies that the "
1599 	"value will be displayed as an unsigned integer.]"
1600 "[x?Puts each \aname\a on the export list.  See \bexport\b(1).  \aname\a "
1601 	"cannot contain a \b.\b.]"
1602 "[A?Associative array.  Each \aname\a will converted to an associate "
1603 	"array.  If a variable already exists, the current value will "
1604 	"become index \b0\b.]"
1605 "[E]#?[n:=10?Floating point number represented in scientific notation. "
1606 	"\an\a specifies the number of significant figures when the "
1607 	"value is expanded.]"
1608 "[F]#?[n:=10?Floating point.  \an\a is the number of places after the "
1609 	"decimal point when the value is expanded.]"
1610 "[H?Hostname mapping.  Each \aname\a holds a native pathname.  Assigning a "
1611 	"UNIX format pathname will cause it to be converted to a pathname "
1612 	"suitable for the current host.  This has no effect when the "
1613 	"native system is UNIX.]"
1614 "[L]#?[n?Left justify.  If \an\a is given it represents the field width.  If "
1615 	"the \b-Z\b attribute is also specified, then leading zeros are "
1616 	"stripped.]"
1617 "[R]#?[n?Right justify.  If \an\a is given it represents the field width.  If "
1618 	"the \b-Z\b attribute is also specified, then zeros will "
1619 	"be used as the fill character.  Otherwise, spaces are used.]"
1620 "[T]:[tname?\atname\a is the name of a type name given to each \aname\a.]"
1621 "[Z]#?[n?Zero fill.  If \an\a is given it represents the field width.]"
1622 "\n"
1623 "\n[name[=value]...]\n"
1624 " -f [name...]\n"
1625 "\n"
1626 "[+EXIT STATUS?]{"
1627         "[+0?No errors occurred.]"
1628         "[+>0?An error occurred.]"
1629 "}"
1630 
1631 "[+SEE ALSO?\breadonly\b(1), \bexport\b(1)]"
1632 ;
1633 
1634 const char sh_optulimit[] =
1635 "[-1c?@(#)$Id: ulimit (AT&T Research) 2003-06-21 $\n]"
1636 USAGE_LICENSE
1637 "[+NAME?ulimit - set or display resource limits]"
1638 "[+DESCRIPTION?\bulimit\b sets or displays resource limits.  These "
1639 	"limits apply to the current process and to each child process "
1640 	"created after the resource limit has been set.  If \alimit\a "
1641 	"is specified, the resource limit is set, otherwise, its current value "
1642 	"is displayed on standard output.]"
1643 "[+?Increasing the limit for a resource usually requires special privileges.  "
1644 	"Some systems allow you to lower resource limits and later increase "
1645 	"them.  These are called soft limits.  Once a hard limit is "
1646 	"set the resource can not be increased.]"
1647 "[+?Different systems allow you to specify different resources and some "
1648 	"restrict how much you can raise the limit of the resource.]"
1649 "[+?The value of \alimit\a depends on the unit of the resource listed "
1650 	"for each resource.  In addition, \alimit\a can be \bunlimited\b "
1651 	"to indicate no limit for that resource.]"
1652 "[+?If you do not specify \b-H\b or \b-S\b, then \b-S\b is used for "
1653 	"listing and both \b-S\b and \b-H\b are used for setting resources.]"
1654 "[+?If you do not specify any resource, the default is \b-f\b.]"
1655 "[H?A hard limit is set or displayed.]"
1656 "[S?A soft limit is set or displayed.]"
1657 "[a?Displays all current resource limits]"
1658 "\flimits\f"
1659 "\n"
1660 "\n[limit]\n"
1661 "\n"
1662 "[+EXIT STATUS?]{"
1663 	"[+0?Successful completion.]"
1664 	"[+>0?A request for a higher limit was rejected or an error occurred.]"
1665 "}"
1666 
1667 "[+SEE ALSO?\bulimit\b(2), \bgetrlimit\b(2)]"
1668 ;
1669 
1670 const char sh_optumask[] =
1671 "[-1c?\n@(#)$Id: umask (AT&T Research) 1999-04-07 $\n]"
1672 USAGE_LICENSE
1673 "[+NAME?umask - get or set the file creation mask]"
1674 "[+DESCRIPTION?\bumask\b sets the file creation mask of the current "
1675 	"shell execution environment to the value specified by the "
1676 	"\amask\a operand.  This mask affects the file permission bits "
1677 	"of subsequently created files.  \amask\a can either be an "
1678 	"octal number or a symbolic value as described in \bchmod\b(1).  "
1679 	"If a symbolic value is given, the new file creation mask is the "
1680 	"complement of the result of applying \amask\a to the complement "
1681 	"of the current file creation mask.]"
1682 "[+?If \amask\a is not specified, \bumask\b writes the value of the "
1683 	"file creation mask for the current process to standard output.]"
1684 "[S?Causes the file creation mask to be written or treated as a symbolic value "
1685 	"rather than an octal number.]"
1686 "\n"
1687 "\n[mask]\n"
1688 "\n"
1689 "[+EXIT STATUS?]{"
1690 	"[+0?The file creation mask was successfully changed, or no "
1691 		"\amask\a operand was supplied.]"
1692 	"[+>0?An error occurred.]"
1693 "}"
1694 "[+SEE ALSO?\bchmod\b(1)]"
1695 ;
1696 const char sh_optuniverse[]	= " [name]";
1697 const char sh_optunset[] =
1698 "[-1c?\n@(#)$Id: unset (AT&T Research) 1999-07-07 $\n]"
1699 USAGE_LICENSE
1700 "[+NAME?unset - unset values and attributes of variables and functions]"
1701 "[+DESCRIPTION?For each \aname\a specified, \bunset\b  unsets the variable, "
1702 	"or function if \b-f\b is specified, from the current shell "
1703 	"execution environment.  Readonly variables cannot be unset.]"
1704 "[n?If \aname\a refers to variable that is a reference, the variable \aname\a "
1705 	"will be unset rather than the variable it references.  Otherwise, "
1706 	"is is equivalent to \b-v\b.]"
1707 "[f?\aname\a refers to a function name and the shell will unset the "
1708 	"function definition.]"
1709 "[v?\aname\a refers to a variable name and the shell will unset it and "
1710 	"remove it from the environment.  This is the default behavior.]"
1711 "\n"
1712 "\nname...\n"
1713 "\n"
1714 "[+EXIT STATUS?]{"
1715         "[+0?All \aname\as were successfully unset.]"
1716         "[+>0?One or more \aname\a operands could not be unset "
1717 	"or an error occurred.]"
1718 "}"
1719 
1720 "[+SEE ALSO?\btypeset\b(1)]"
1721 ;
1722 
1723 const char sh_optunalias[] =
1724 "[-1c?\n@(#)$Id: unalias (AT&T Research) 1999-07-07 $\n]"
1725 USAGE_LICENSE
1726 "[+NAME?unalias - remove alias definitions]"
1727 "[+DESCRIPTION?\bunalias\b removes the definition of each named alias "
1728 	"from the current shell execution environment, or all aliases if "
1729 	"\b-a\b is specified.  It will not affect any commands that "
1730 	"have already been read and subsequently executed.]"
1731 "[a?Causes all alias definitions to be removed.  \aname\a operands "
1732 	"are optional and ignored in this case.]"
1733 "\n"
1734 "\nname...\n"
1735 "\n"
1736 "[+EXIT STATUS?]{"
1737         "[+0?Successful completion.]"
1738         "[+>0?\b-a\b was not specified and one or more \aname\a operands "
1739 	"did not have an alias definition, or an error occurred.]"
1740 "}"
1741 
1742 "[+SEE ALSO?\balias\b(1)]"
1743 ;
1744 
1745 const char sh_optwait[]	=
1746 "[-1c?\n@(#)$Id: wait (AT&T Research) 1999-06-17 $\n]"
1747 USAGE_LICENSE
1748 "[+NAME?wait - wait for process or job completion]"
1749 "[+DESCRIPTION?\bwait\b with no operands, waits until all jobs "
1750 	"known to the invoking shell have terminated.  If one or more "
1751 	"\ajob\a operands are specified, \bwait\b waits until all of them "
1752 	"have completed.]"
1753 "[+?Each \ajob\a can be specified as one of the following:]{"
1754 	"[+\anumber\a?\anumber\a refers to a process id.]"
1755 	"[+-\anumber\a?\anumber\a refers to a process group id.]"
1756 	"[+%\anumber\a?\anumber\a refer to a job number.]"
1757 	"[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
1758 	"[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
1759 	"[+%+ \bor\b %%?Refers to the current job.]"
1760 	"[+%-?Refers to the previous job.]"
1761 "}"
1762 "[+?If one ore more \ajob\a operands is a process id or process group id "
1763 	"not known by the current shell environment, \bwait\b treats each "
1764 	"of them as if it were a process that exited with status 127.]"
1765 "\n"
1766 "\n[job ...]\n"
1767 "\n"
1768 "[+EXIT STATUS?If \await\a is invoked with one or more \ajob\as, and all of "
1769 	"them have terminated or were not known by the invoking shell, "
1770 	"the exit status of \bwait\b  will be that of the last \ajob\a.  "
1771 	"Otherwise, it will be one of the following:]{"
1772 	"[+0?\bwait\b utility was invoked with no operands and all "
1773 		"processes known by the invoking process have terminated.]"
1774 	"[+127?\ajob\a is a process id or process group id that is unknown "
1775 		"to the current shell environment.]"
1776 "}"
1777 
1778 "[+SEE ALSO?\bjobs\b(1), \bps\b(1)]"
1779 ;
1780 
1781 #if SHOPT_FS_3D
1782     const char sh_optvpath[]	= " [top] [base]";
1783     const char sh_optvmap[]	= " [dir] [list]";
1784 #endif /* SHOPT_FS_3D */
1785 
1786 const char sh_optwhence[] =
1787 "[-1c?\n@(#)$Id: whence (AT&T Research) 1999-07-07 $\n]"
1788 USAGE_LICENSE
1789 "[+NAME?whence - locate a command and describe its type]"
1790 "[+DESCRIPTION?Without \b-v\b, \bwhence\b writes on standard output an "
1791 	"absolute pathname, if any, corresponding to \aname\a based "
1792 	"on the complete search order that the shell uses.  If \aname\a "
1793 	"is not found, then no output is produced.]"
1794 "[+?If \b-v\b is specified, the output will also contain information "
1795 	"that indicates how the given \aname\a would be interpretted by "
1796 	"the shell in the current execution environment.]"
1797 "[a?Displays all uses for each \aname\a rather than the first.]"
1798 "[f?Do not check for functions.]"
1799 "[p?Do not check to see if \aname\a is a reserved word, a built-in, "
1800 	"an alias, or a function.]"
1801 "[v?For each name you specify, the shell displays a line that indicates "
1802 	"if that name is one of the following:]{"
1803 	"[+?Reserved word]"
1804 	"[+?Alias]"
1805 	"[+?Built-in]"
1806 	"[+?Undefined function]"
1807 	"[+?Function]"
1808 	"[+?Tracked alias]"
1809 	"[+?Program]"
1810 	"[+?Not found]"
1811 "}"
1812 "\n"
1813 "\nname  ...\n"
1814 "\n"
1815 "[+EXIT STATUS?]{"
1816 	"[+0?Each \aname\a was found by the shell.]"
1817 	"[+1?One or more \aname\as were not found by the shell.]"
1818 	"[+>1?An error occurred.]"
1819 "}"
1820 
1821 "[+SEE ALSO?\bcommand\b(1)]"
1822 ;
1823 
1824 
1825 const char e_alrm1[]		= "alarm -r %s +%.3g\n";
1826 const char e_alrm2[]		= "alarm %s %.3f\n";
1827 const char e_baddisc[]		= "%s: invalid discipline function";
1828 const char e_nospace[]		= "out of memory";
1829 const char e_nofork[]		= "cannot fork";
1830 const char e_nosignal[]		= "%s: unknown signal name";
1831 const char e_numeric[]		= "*([0-9])?(.)*([0-9])";
1832 const char e_condition[]	= "condition(s) required";
1833 const char e_cneedsarg[]	= "-c requires argument";
1834