xref: /titanic_50/usr/src/lib/libshell/common/data/builtins.c (revision a1e9eea083a8f257157edb8a1efb5bbd300eb4bf)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *          Copyright (c) 1982-2008 AT&T Intellectual Property          *
5 *                      and is licensed under the                       *
6 *                  Common Public License, Version 1.0                  *
7 *                    by AT&T Intellectual Property                     *
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 #if defined(SHOPT_CMDLIB_DIR) && !defined(SHOPT_CMDLIB_HDR)
41 #	define SHOPT_CMDLIB_HDR	<cmdlist.h>
42 #endif
43 #define Q(f)		#f	/* libpp cpp workaround -- fixed 2005-04-11 */
44 #define CMDLIST(f)	SH_CMDLIB_DIR "/" Q(f), NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f),
45 
46 #undef	basename
47 #undef	dirname
48 
49 /*
50  * The order up through "[" is significant
51  */
52 const struct shtable3 shtab_builtins[] =
53 {
54 	"login",	NV_BLTIN|BLT_ENV|BLT_SPC,	Bltin(login),
55 	"exec",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(exec),
56 	"set",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(set),
57 	":",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(true),
58 	"true",		NV_BLTIN|BLT_ENV,		bltin(true),
59 	"command",	NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(command),
60 	"cd",		NV_BLTIN|BLT_ENV,		bltin(cd),
61 	"break",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(break),
62 	"continue",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(break),
63 	"typeset",	NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(typeset),
64 	"test",		NV_BLTIN|BLT_ENV,		bltin(test),
65 	"[",		NV_BLTIN|BLT_ENV,		bltin(test),
66 	"let",		NV_BLTIN|BLT_ENV,		bltin(let),
67 	"export",	NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(readonly),
68 	".",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(dot_cmd),
69 	"return",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(return),
70 #if SHOPT_BASH
71 	"local",	NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(typeset),
72 #endif
73 #if _bin_newgrp || _usr_bin_newgrp
74 	"newgrp",	NV_BLTIN|BLT_ENV|BLT_SPC,	Bltin(login),
75 #endif	/* _bin_newgrp || _usr_bin_newgrp */
76 	"alias",	NV_BLTIN|BLT_SPC|BLT_DCL,	bltin(alias),
77 	"hash",		NV_BLTIN|BLT_SPC|BLT_DCL,	bltin(alias),
78 	"enum",		NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(enum),
79 	"eval",		NV_BLTIN|BLT_ENV|BLT_SPC|BLT_EXIT,bltin(eval),
80 	"exit",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(return),
81 	"fc",		NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(hist),
82 	"hist",		NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(hist),
83 	"readonly",	NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(readonly),
84 	"shift",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(shift),
85 	"trap",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(trap),
86 	"unalias",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(unalias),
87 	"unset",	NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(unset),
88 	"builtin",	NV_BLTIN,			bltin(builtin),
89 #if SHOPT_ECHOPRINT
90 	"echo",		NV_BLTIN|BLT_ENV,		bltin(print),
91 #else
92 	"echo",		NV_BLTIN|BLT_ENV,		Bltin(echo),
93 #endif /* SHOPT_ECHOPRINT */
94 #ifdef JOBS
95 #   ifdef SIGTSTP
96 	"bg",		NV_BLTIN|BLT_ENV,		bltin(bg),
97 	"fg",		NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(bg),
98 	"disown",	NV_BLTIN|BLT_ENV,		bltin(bg),
99 	"kill",		NV_BLTIN|BLT_ENV,		bltin(kill),
100 #   else
101 	"/bin/kill",	NV_BLTIN|BLT_ENV,		bltin(kill),
102 #   endif	/* SIGTSTP */
103 	"jobs",		NV_BLTIN|BLT_ENV,		bltin(jobs),
104 #endif	/* JOBS */
105 	"false",	NV_BLTIN|BLT_ENV,		bltin(false),
106 	"getopts",	NV_BLTIN|BLT_ENV,		bltin(getopts),
107 	"print",	NV_BLTIN|BLT_ENV,		bltin(print),
108 	"printf",	NV_BLTIN|BLT_ENV,		bltin(printf),
109 	"pwd",		NV_BLTIN,			bltin(pwd),
110 	"read",		NV_BLTIN|BLT_ENV,		bltin(read),
111 	"sleep",	NV_BLTIN,			bltin(sleep),
112 	"alarm",	NV_BLTIN,			bltin(alarm),
113 	"ulimit",	NV_BLTIN|BLT_ENV,		bltin(ulimit),
114 	"umask",	NV_BLTIN|BLT_ENV,		bltin(umask),
115 #ifdef _cmd_universe
116 	"universe",	NV_BLTIN|BLT_ENV,		bltin(universe),
117 #endif /* _cmd_universe */
118 #if SHOPT_FS_3D
119 	"vpath",	NV_BLTIN|BLT_ENV,		bltin(vpath),
120 	"vmap",		NV_BLTIN|BLT_ENV,		bltin(vpath),
121 #endif /* SHOPT_FS_3D */
122 	"wait",		NV_BLTIN|BLT_ENV|BLT_EXIT,	bltin(wait),
123 	"type",		NV_BLTIN|BLT_ENV,		bltin(whence),
124 	"whence",	NV_BLTIN|BLT_ENV,		bltin(whence),
125 #ifdef SHOPT_CMDLIB_HDR
126 #include SHOPT_CMDLIB_HDR
127 #else
128 	CMDLIST(basename)
129 	CMDLIST(chmod)
130 	CMDLIST(dirname)
131 	CMDLIST(getconf)
132 	CMDLIST(head)
133 	CMDLIST(mkdir)
134 	CMDLIST(logname)
135 	CMDLIST(cat)
136 	CMDLIST(cmp)
137 	CMDLIST(cut)
138 	CMDLIST(uname)
139 	CMDLIST(wc)
140 	CMDLIST(sync)
141 #endif
142 	"",		0, 0
143 };
144 
145 
146 const char sh_set[] =
147 "[a?Set the export attribute for each variable whose name does not "
148 	"contain a \b.\b that you assign a value in the current shell "
149 	"environment.]"
150 "[b?The shell writes a message to standard error as soon it detects that "
151 	"a background job completes rather than waiting until the next prompt.]"
152 "[e?A simple command that has an non-zero exit status will cause the shell "
153 	"to exit unless the simple command is:]{"
154 	"[++?contained in an \b&&\b or \b||\b list.]"
155 	"[++?the command immediately following \bif\b, \bwhile\b, or \buntil\b.]"
156 	"[++?contained in the pipeline following \b!\b.]"
157 "}"
158 "[f?Pathname expansion is disabled.]"
159 "[h?Obsolete.  Causes each command whose name has the syntax of an "
160 	"alias to become a tracked alias when it is first encountered.]"
161 "[k?This is obsolete.  All arguments of the form \aname\a\b=\b\avalue\a "
162 	"are removed and placed in the variable assignment list for "
163 	"the command.  Ordinarily, variable assignments must precede "
164 	"command arguments.]"
165 "[m?When enabled, the shell runs background jobs in a separate process "
166 	"group and displays a line upon completion.  This mode is enabled "
167 	"by default for interactive shells on systems that support job "
168 	"control.]"
169 "[n?The shell reads commands and checks for syntax errors, but does "
170 	"not execute the command.  Usually specified on command invocation.]"
171 "[o]:?[option?If \aoption\a is not specified, the list of options and "
172 	"their current settings will be written to standard output.  When "
173 	"invoked with a \b+\b the options will be written in a format "
174 	"that can be reinput to the shell to restore the settings. "
175 	"This option can be repeated to enable/disable multiple options. "
176 	"The value of \aoption\a must be one of the following:]{"
177 		"[+allexport?Equivalent to \b-a\b.]"
178 		"[+bgnice?Runs background jobs at lower priorities.]"
179 		"[+braceexpand?Equivalent to \b-B\b.] "
180 		"[+emacs?Enables/disables \bemacs\b editing mode.]"
181 		"[+errexit?Equivalent to \b-e\b.]"
182 		"[+globstar?Equivalent to \b-G\b.]"
183 		"[+gmacs?Enables/disables \bgmacs\b editing mode.  \bgmacs\b "
184 			"editing mode is the same as \bemacs\b editing mode "
185 			"except for the handling of \b^T\b.]"
186 #if SHOPT_BASH
187 		"[+hashall?Equivalent to \b-h\b and \b-o trackall\b. Available "
188 		"in bash compatibility mode only.]"
189 		"[+history?Enable command history. Available in bash "
190 		"compatibility mode only. On by default in interactive "
191 		"shells.]"
192 #endif
193 #if SHOPT_HISTEXPAND
194 		"[+histexpand?Equivalent to \b-H\b.]"
195 #endif
196 		"[+ignoreeof?Prevents an interactive shell from exiting on "
197 			"reading an end-of-file.]"
198 		"[+keyword?Equivalent to \b-k\b.]"
199 		"[+markdirs?A trailing \b/\b is appended to directories "
200 			"resulting from pathname expansion.]"
201 		"[+monitor?Equivalent to \b-m\b.]"
202 		"[+multiline?Use multiple lines when editing lines that are "
203 			"longer than the window width.]"
204 		"[+noclobber?Equivalent to \b-C\b.]"
205 		"[+noexec?Equivalent to \b-n\b.]"
206 		"[+noglob?Equivalent to \b-f\b.]"
207 		"[+nolog?This has no effect.  It is provided for backward "
208 			"compatibility.]"
209 		"[+notify?Equivalent to \b-b\b.]"
210 		"[+nounset?Equivalent to \b-u\b.]"
211 #if SHOPT_BASH
212 		"[+onecmd?Equivalent to \b-t\b. Available in bash compatibility "
213 		"mode only.]"
214 		"[+physical?Equivalent to \b-P\b. Available in bash "
215 		"compatibility mode only.]"
216 		"[+posix?Turn on POSIX compatibility. Available in bash "
217 		"compatibility mode only. Bash in POSIX mode is not the "
218 		"same as ksh.]"
219 #endif
220 		"[+pipefail?A pipeline will not complete until all components "
221 			"of the pipeline have completed, and the exit status "
222 			"of the pipeline will be the value of the last "
223 			"command to exit with non-zero exit status, or will "
224 			"be zero if all commands return zero exit status.]"
225 		"[+privileged?Equivalent to \b-p\b.]"
226 		"[+showme?Simple commands preceded by a \b;\b will be traced "
227 			"as if \b-x\b were enabled but not executed.]"
228 		"[+trackall?Equivalent to \b-h\b.]"
229 		"[+verbose?Equivalent to \b-v\b.]"
230 		"[+vi?Enables/disables \bvi\b editing mode.]"
231 		"[+viraw?Does not use canonical input mode when using \bvi\b "
232 			"edit mode.]"
233 		"[+xtrace?Equivalent to \b-x\b.]"
234 "}"
235 "[p?Privileged mode.  Disabling \b-p\b sets the effective user id to the "
236 	"real user id, and the effective group id to the real group id.  "
237 	"Enabling \b-p\b restores the effective user and group ids to their "
238 	"values when the shell was invoked.  The \b-p\b option is on "
239 	"whenever the real and effective user id is not equal or the "
240 	"real and effective group id is not equal.  User profiles are "
241 	"not processed when \b-p\b is enabled.]"
242 "[r?restricted.  Enables restricted shell.  This option cannot be unset once "
243 	"enabled.]"
244 "[t?Obsolete.  The shell reads one command and then exits.]"
245 "[u?If enabled, the shell displays an error message when it tries to expand "
246 	"a variable that is unset.]"
247 "[v?Verbose.  The shell displays its input onto standard error as it "
248 	"reads it.]"
249 "[x?Execution trace.  The shell will display each command after all "
250 	"expansion and before execution preceded by the expanded value "
251 	"of the \bPS4\b parameter.]"
252 #if SHOPT_BASH
253 	"\fbash1\f"
254 #endif
255 #if SHOPT_BRACEPAT
256 "[B?Enable {...} group expansion. On by default.]"
257 #endif
258 "[C?Prevents existing regular files from being overwritten using the \b>\b "
259 	"redirection operator.  The \b>|\b redirection overrides this "
260 	"\bnoclobber\b option.]"
261 "[G?Causes \b**\b by itself to also match all sub-directories during pathname "
262 	"expansion.]"
263 #if SHOPT_HISTEXPAND
264    "[H?Enable \b!\b-style history expansion similar to \bcsh\b.]"
265 #endif
266 ;
267 
268 const char sh_optbreak[] =
269 "[-1c?\n@(#)$Id: break (AT&T Research) 1999-04-07 $\n]"
270 USAGE_LICENSE
271 "[+NAME?break - break out of loop ]"
272 "[+DESCRIPTION?\bbreak\b is a shell special built-in that exits the "
273 	"smallest enclosing \bfor\b, \bselect\b, \bwhile\b, or \buntil\b loop, "
274 	"or the \an\a-th enclosing loop if \an\a is specified.  "
275 	"Execution continues at the command following the loop(s).]"
276 "[+?If \an\a is given, it must be a positive integer >= 1. If \an\a "
277 	"is larger than the number of enclosing loops, the last enclosing "
278 	"loop will be exited.]"
279 "\n"
280 "\n[n]\n"
281 "\n"
282 "[+EXIT STATUS?0]"
283 "[+SEE ALSO?\bcontinue\b(1), \breturn\b(1)]"
284 ;
285 
286 const char sh_optcont[] =
287 "[-1c?\n@(#)$Id: continue (AT&T Research) 1999-04-07 $\n]"
288 USAGE_LICENSE
289 "[+NAME?continue - continue execution at top of the loop]"
290 "[+DESCRIPTION?\bcontinue\b is a shell special built-in that continues "
291 	"execution at the top of smallest enclosing enclosing \bfor\b, "
292 	"\bselect\b, \bwhile\b, or \buntil\b loop, if any; or the top of "
293 	"the \an\a-th enclosing loop if \an\a is specified.]"
294 "[+?If \an\a is given, it must be a positive integer >= 1. If \an\a "
295 	"is larger than the number of enclosing loops, the last enclosing "
296 	" loop will be used.]"
297 
298 "\n"
299 "\n[n]\n"
300 "\n"
301 "[+SEE ALSO?\bbreak\b(1)]"
302 ;
303 
304 const char sh_optalarm[]	= "r [varname seconds]";
305 const char sh_optalias[] =
306 "[-1c?\n@(#)$Id: alias (AT&T Research) 1999-07-07 $\n]"
307 USAGE_LICENSE
308 "[+NAME?alias - define or display aliases]"
309 "[+DESCRIPTION?\balias\b creates or redefines alias definitions "
310 	"or writes the existing alias definitions to standard output.  "
311 	"An alias definitions provides a string value that will replace "
312 	"a command name when the command is read.  Alias names can "
313 	"contain any printable character which is not special to the shell.  "
314 	"If an alias value ends in a space or tab, then the word "
315 	"following the command name the alias replaces is also checked "
316 	"to see whether it is an alias.]"
317 "[+?If no \aname\as are specified then the names and values of all "
318 	"aliases are written to standard output.  Otherwise, for "
319 	"each \aname\a that is specified, and \b=\b\avalue\a  is not "
320 	"specified, the current value of the alias corresponding to "
321 	"\aname\a is written to standard output.  If \b=\b\avalue\a is "
322 	"specified, the alias \aname\a will be created or redefined.]"
323 "[+?\balias\b is built-in to the shell as a declaration command so that "
324 	"field splitting and pathname expansion are not performed on "
325 	"the arguments.  Tilde expansion occurs on \avalue\a.  An alias "
326 	"definition only affects scripts read by the current shell "
327 	"environment.  It does not effect scripts run by this shell.]"
328 "[p?Causes the output to be in the form of alias commands that can be used "
329 	"as input to the shell to recreate the current aliases.]"
330 "[t?Used for tracked aliases.  These are aliases that connect a "
331 	"command name to the pathname of the command and are reset "
332 	"when the \bPATH\b variable is unset.  The tracked aliases feature is "
333 	"now obsolete.]"
334 "[x?Ignored, this option is obsolete.]"
335 "\n"
336 "\n[name[=value]...]\n"
337 "\n"
338 "[+EXIT STATUS?]{"
339         "[+0?Successful completion.]"
340         "[+>0?One or more \aname\a operands did not have an alias "
341 		"definition, or an error occurred.]"
342 "}"
343 
344 "[+SEE ALSO?\bsh\b(1), \bunalias\b(1)]"
345 ;
346 
347 const char sh_optbuiltin[] =
348 "[-1c?\n@(#)$Id: builtin (AT&T Research) 1999-07-10 $\n]"
349 USAGE_LICENSE
350 "[+NAME?builtin - add, delete, or display shell built-ins]"
351 "[+DESCRIPTION?\bbuiltin\b can be used to add, delete, or display "
352     "built-in commands in the current shell environment. A built-in command "
353     "executes in the current shell process and can have side effects in the "
354     "current shell. On most systems, the invocation time for built-in "
355     "commands is one or two orders of magnitude less than commands that "
356     "create a separate process.]"
357 "[+?For each \apathname\a specified, the basename of the pathname "
358     "determines the name of the built-in. For each basename, the shell looks "
359     "for a C level function in the current shell whose name is determined by "
360     "prepending \bb_\b to the built-in name. If \apathname\a contains a "
361     "\b/\b, then the built-in is bound to this pathname. A built-in bound to "
362     "a pathname will only be executed if \apathname\a is the first "
363     "executable found during a path search. Otherwise, built-ins are found "
364     "prior to performing the path search.]"
365 "[+?If no \apathname\a operands are specified, then \bbuiltin\b displays "
366     "the current list of built-ins, or just the special built-ins if \b-s\b "
367     "is specified, on standard output. The full pathname for built-ins that "
368     "are bound to pathnames are displayed.]"
369 "[+?Libraries containing built-ins can be specified with the \b-f\b "
370     "option. If the library contains a function named \blib_init\b(), this "
371     "function will be invoked with argument \b0\b when the library is "
372     "loaded. The \blib_init\b() function can load built-ins by invoking an "
373     "appropriate C level function. In this case there is no restriction on "
374     "the C level function name.]"
375 "[+?The C level function will be invoked with three arguments. The first "
376     "two are the same as \bmain\b() and the third one is a pointer.]"
377 "[+?\bbuiltin\b cannot be invoked from a restricted shell.]"
378 "[d?Deletes each of the specified built-ins. Special built-ins cannot be "
379     "deleted.]"
380 "[f]:[lib?On systems with dynamic linking, \alib\a names a shared "
381     "library to load and search for built-ins. Libraries are search for in "
382     "\b$PATH\b and system dependent library directories. The system "
383     "dependent shared library prefix and/or suffix may be omitted. Once a "
384     "library is loaded, its symbols become available for the current and "
385     "subsequent invocations of \bbuiltin\b. Multiple libraries can be "
386     "specified with separate invocations of \bbuiltin\b. Libraries are "
387     "searched in the reverse order in which they are specified.]"
388 "[s?Display only the special built-ins.]"
389 "\n"
390 "\n[pathname ...]\n"
391 "\n"
392 "[+EXIT STATUS?]{"
393 	"[+0?All \apathname\a operands and \b-f\b options processed "
394 	"successfully.]"
395 	"[+>0?An error occurred.]"
396 "}"
397 "[+SEE ALSO?\bwhence\b(1)]"
398 ;
399 
400 const char sh_optcd[] =
401 "[-1c?\n@(#)$Id: cd (AT&T Research) 1999-06-05 $\n]"
402 USAGE_LICENSE
403 "[+NAME?cd - change working directory ]"
404 "[+DESCRIPTION?\bcd\b changes the current working directory of the "
405 	"current shell environment.]"
406 "[+?In the first form with one operand, if \adirectory\a begins with "
407 	"\b/\b, or if the first component is \b.\b or \b..\b, the "
408 	"directory will be changed to this directory.  If directory is \b-\b, "
409 	"the directory will be changed to the last directory visited.  "
410 	"Otherwise, if the \bCDPATH\b environment variable is set, \bcd\b "
411 	"searches for \adirectory\a relative to each directory named in "
412 	"the colon separated list of directories defined by \bCDPATH\b.  "
413 	"If \bCDPATH\b not set, \bcd\b changes to the directory specified "
414 	"by \adirectory\a.]"
415 "[+?In the second form, the first occurrence of the string \aold\a "
416 	"contained in the pathname of the present working directory "
417 	"is replaced by the string \anew\a and the resulting string "
418 	"is used as the directory to which to change.]"
419 "[+?When invoked without operands and when the \bHOME\b environment "
420 	"variable is set to a nonempty value,  the directory named by "
421 	"the \bHOME\b environment variable will be used.  If \bHOME\b "
422 	"is empty or unset, \bcd\b will fail.]"
423 "[+?When \bcd\b is successful, the \bPWD\b environment variable will be set "
424 	"to the name of an absolute pathname that does not contain any "
425 	"\b..\b components corresponding to the new directory.  The "
426 	"environment variable \bOLDPWD\b will be set to the previous "
427 	"value of \bPWD\b.  If the new directory is found by searching "
428 	"the directories named by \bCDPATH\b, or if \adirectory\a is \b-\b, "
429 	"or if the two operand form is used, the new value of \bPWD\b will be "
430 	"written to standard output.]"
431 "[+?If both \b-L\b and \b-P\b are specified, the last one specified will "
432 	"be used.  If neither \b-P\b or \b-L\b is specified then the "
433 	"behavior will be determined by the \bgetconf\b parameter "
434 	"\bPATH_RESOLVE\b.  If \bPATH_RESOLVE\b is \bphysical\b, "
435 	"then the behavior will be as if \b-P\b were specified.  Otherwise, "
436 	"the behavior will be as if  \b-L\b were specified.]"
437 "[L?Handle each pathname component \b..\b in a logical fashion by moving "
438 	"up one level by name in the present working directory.]"
439 "[P?The present working directory is first converted to an absolute pathname "
440 	"that does not contain symbolic link components and symbolic name "
441 	"components are expanded in the resulting directory name.]"
442 "\n"
443 "\n[directory]\n"
444 "old new\n"
445 "\n"
446 "[+EXIT STATUS?]{"
447 	"[+0?Directory successfully changed.]"
448 	"[+>0?An error occurred.]"
449 "}"
450 "[+SEE ALSO?\bpwd\b(1), \bgetconf\b(1)]"
451 ;
452 
453 const char sh_optcommand[] =
454 "[-1c?\n@(#)$Id: command (AT&T Research) 2003-08-01 $\n]"
455 USAGE_LICENSE
456 "[+NAME?command - execute a simple command]"
457 "[+DESCRIPTION?Without \b-v\b or \b-V\b,  \bcommand\b executes \acommand\a "
458 	"with arguments given by \aarg\a, suppressing the shell function lookup "
459 	"that normally occurs.  In addition, if \acommand\a is a special "
460 	"built-in command, then the special properties are removed so that "
461 	"failures will not cause the script that executes it to terminate.]"
462 "[+?With the \b-v\b or \b-V\b options, \bcommand\b is equivalent to the "
463 	"\bwhence\b(1) command.]"
464 "[p?Causes a default path to be searched rather than the one defined by the "
465 	"value of \bPATH\b.]"
466 "[v?Equivalent to \bwhence\b \acommand\a [\aarg\a ...]].]"
467 "[x?If \acommand\a fails because there are too many \aarg\as, it will be "
468 	"invoked multiple times with a subset of the arguments on each "
469 	"invocation.  Arguments that occur prior to the first word that expand "
470 	"to multiple arguments and arguments that occur after the last word "
471 	"that expands to multiple arguments will be passed on each invocation. "
472 	"The exit status will be the maximum invocation exit status.]"
473 "[V?Equivalent to \bwhence \b-v\b \acommand\a [\aarg\a ...]].]"
474 "\n"
475 "\n[command [arg ...]]\n"
476 "\n"
477 "[+EXIT STATUS?If \acommand\a is invoked, the exit status of \bcommand\b "
478 	"will be that of \acommand\a.  Otherwise, it will be one of "
479 	"the following:]{"
480 	"[+0?\bcommand\b completed successfully.]"
481 	"[+>0?\b-v\b or \b-V\b has been specified and an error occurred.]"
482 	"[+126?\acommand\a was found but could not be invoked.]"
483 	"[+127?\acommand\a could not be found.]"
484 "}"
485 
486 "[+SEE ALSO?\bwhence\b(1), \bgetconf\b(1)]"
487 ;
488 
489 const char sh_optdot[]	 =
490 "[-1c?@(#)$Id: \b.\b (AT&T Research) 2000-04-02 $\n]"
491 USAGE_LICENSE
492 "[+NAME?\b.\b - execute commands in the current environment]"
493 "[+DESCRIPTION?\b.\b is a special built-in command that executes commands "
494 	"from a function or a file in the current environment.]"
495 "[+?If \aname\a refers to a function defined with the \bfunction\b \aname\a "
496 	"syntax, the function executes in the current environment as "
497 	"if it had been defined with the \aname\a\b()\b syntax so that "
498 	"there is no scoping.  Otherwise, commands from the file defined "
499 	"by \aname\a are executed in the current environment.  Note that "
500 	"the complete script is read before it begins to execute so that "
501 	"any aliases defined in this script will not take effect until "
502 	"the script completes execution.]"
503 "[+?When \aname\a refers to a file, the \bPATH\b variable is searched "
504 	"for the file containing commands.  In this case execute permission "
505 	"is not required for \aname\a.]"
506 "[+?If any \aarg\as are specified, these become the positional parameters "
507 	"for the duration of the function or script and are restored "
508 	"upon completion.]"
509 "\n"
510 "\n name [arg ...]\n"
511 "\n"
512 "[+EXIT STATUS?If \aname\a is found, then the exit status is that "
513 	"of the last command executed.  Otherwise, since this is a special "
514 	"built-in, an error will cause a non-interactive shell to exit with "
515 	"a non-zero exit status.  An interactive shell returns a non-zero exit "
516 	"status to indicate an error.]"
517 
518 "[+SEE ALSO?\bcommand\b(1), \bksh\b(1)]"
519 ;
520 
521 #ifndef ECHOPRINT
522     const char sh_optecho[]	= " [-n] [arg...]";
523 #endif /* !ECHOPRINT */
524 
525 const char sh_opteval[] =
526 "[-1c?\n@(#)$Id: eval (AT&T Research) 1999-07-07 $\n]"
527 USAGE_LICENSE
528 "[+NAME?eval - create a shell command and process it]"
529 "[+DESCRIPTION?\beval\b is a shell special built-in command that constructs "
530 	"a command by concatenating the \aarg\as together, separating each "
531 	"with a space.  The resulting string is then taken as input to "
532 	"the shell and evaluated in the current environment.  Note that "
533 	"command words are expanded twice; once to construct \aarg\a, and "
534 	"again when the shell executes the constructed command.]"
535 "[+?It is not an error if \aarg\a is not given.]"
536 "\n"
537 "\n[arg...]\n"
538 "\n"
539 "[+EXIT STATUS?If \aarg\a is not specified, the exit status is \b0\b.  "
540 	"Otherwise, it is the exit status of the command defined by the "
541 	"\aarg\a operands.]"
542 "[+SEE ALSO?\bexec\b(1), \btrap\b(1), \b.\b(1)]"
543 ;
544 
545 const char sh_optexec[] =
546 "[-1c?\n@(#)$Id: exec (AT&T Research) 1999-07-10 $\n]"
547 USAGE_LICENSE
548 "[+NAME?exec - execute command, open/close and duplicate file descriptors]"
549 "[+DESCRIPTION?\bexec\b is a special built-in command that can be used to "
550 	"manipulate file descriptors or to replace the current shell "
551 	"with a new command.]"
552 "[+?If \acommand\a is specified, then the current shell process will be "
553 	"replaced by \acommand\a rather than running \acommand\a and waiting "
554 	"for it to complete.  Note that there is no need to use "
555 	"\bexec\b to enhance performance since the shell implicitly "
556 	"uses the exec mechanism internally whenever possible.]"
557 "[+?If no operands are specified, \bexec\b can be used to open or "
558 	"close files, or to manipulate file descriptors from \b0\b to "
559 	"\b9\b in the current shell environment using the standard "
560 	"redirection mechanism available with all commands.  The "
561 	"close-on-exec flags will be set on file descriptor numbers "
562 	"greater than \b2\b that are opened this way so that they "
563 	"will be closed when another program is invoked.]"
564 "[+?Because \bexec\b is a special command, any failure will cause the "
565 	"script that invokes it to exit.  This can be prevented by "
566 	"invoking \bexec\b from the \bcommand\b utility.]"
567 "[+?\bexec\b cannot be invoked from a restricted shell to create "
568 	"files or to open a file for writing or appending.]"
569 "[c?Clear all environment variables before executions except variable "
570 	"assignments that are part of the current \bexec\b command.]"
571 "[a]:[name?\bargv[0]]\b will be set to \aname\a for \acommand\a]"
572 "\n"
573 "\n[command [arg ...]]\n"
574 "\n"
575 "[+EXIT STATUS?If \acommand\a is specified, \bexec\b does not return.  "
576 	"Otherwise, the exit status is one of the following:]{"
577 	"[+0?All I/O redirections were successful.]"
578 	"[+>0?An error occurred.]"
579 "}"
580 "[+SEE ALSO?\bcommand\b(1), \beval\b(1)]"
581 ;
582 
583 
584 const char sh_optexit[] =
585 "[-1c?\n@(#)$Id: exit (AT&T Research) 1999-07-07 $\n]"
586 USAGE_LICENSE
587 "[+NAME?exit - exit the current shell]"
588 "[+DESCRIPTION?\bexit\b is shell special built-in that causes the "
589 	"shell that invokes it to exit.  Before exiting the shell, if the "
590 	"\bEXIT\b trap is set it will be invoked.]"
591 "[+?If \an\a is given, it will be used to set the exit status.]"
592 "\n"
593 "\n[n]\n"
594 "\n"
595 "[+EXIT STATUS?If \an\a is specified, the exit status is the least significant "
596 	"eight bits of the value of \an\a.  Otherwise, the exit status is the "
597 	"exit status of preceding command.  When invoked inside a trap, the "
598 	"preceding command means the command that invoked the trap.]"
599 "[+SEE ALSO?\bbreak\b(1), \breturn\b(1)]"
600 ;
601 
602 const char sh_optexport[] =
603 "[-1c?\n@(#)$Id: export (AT&T Research) 1999-07-07 $\n]"
604 USAGE_LICENSE
605 "[+NAME?export - set export attribute on variables]"
606 "[+DESCRIPTION?\bexport\b sets the export attribute on each of "
607 	"the variables specified by \aname\a which causes them "
608 	"to be in the environment of subsequently executed commands.  "
609 	"If \b=\b\avalue\a is specified, the variable \aname\a is "
610 	"set to \avalue\a.]"
611 "[+?If no \aname\as are specified then the names and values of all "
612 	"exported variables are written to standard output.]"
613 "[+?\bexport\b is built-in to the shell as a declaration command so that "
614 	"field splitting and pathname expansion are not performed on "
615 	"the arguments.  Tilde expansion occurs on \avalue\a.]"
616 "[p?Causes the output to be in the form of \bexport\b commands that can be "
617 	"used as input to the shell to recreate the current exports.]"
618 "\n"
619 "\n[name[=value]...]\n"
620 "\n"
621 "[+EXIT STATUS?]{"
622         "[+0?Successful completion.]"
623         "[+>0?An error occurred.]"
624 "}"
625 
626 "[+SEE ALSO?\bsh\b(1), \btypeset\b(1)]"
627 ;
628 
629 const char sh_optgetopts[] =
630 ":[-1c?\n@(#)$Id: getopts (AT&T Research) 2005-01-01 $\n]"
631 "[-author?Glenn Fowler <gsf@research.att.com>]"
632 USAGE_LICENSE
633 "[+NAME?\f?\f - parse utility options]"
634 "[+DESCRIPTION?The \bgetopts\b utility can be used to retrieve options and "
635   "arguments from a list of arguments given by \aargs\a or the positional "
636   "parameters if \aargs\a is omitted.  It can also generate usage messages "
637   "and a man page for the command based on the information in \aoptstring\a.]"
638 "[+?Each time it is invoked, the \bgetopts\b utility places the value "
639   "of the next option in the shell variable specified by the \aname\a "
640   "operand and the index of the next argument to be processed in the "
641   "shell variable \bOPTIND\b.  When the shell is invoked \bOPTIND\b "
642   "is initialized to \b1\b.  When an option requires or permits an option "
643   "argument, \bgetopts\b places the option argument in the shell "
644   "variable \bOPTARG\b. Otherwise \bOPTARG\b is set to \b1\b when the "
645   "option is set and \b0\b when the option is unset.]"
646 "[+?The \aoptstring\a string consists of alpha-numeric characters, "
647   "the special characters +, -, ?, :, and <space>, or character groups "
648   "enclosed in [...]].  Character groups may be nested in {...}. "
649   "Outside of a [...]] group, a single new-line followed by zero or "
650   "more blanks is ignored.  One or more blank lines separate the "
651   "options from the command argument synopsis.]"
652 "[+?Each [...]] group consists of an optional label, "
653   "optional attributes separated by :, and an "
654   "optional description string following ?.  The characters from the ? "
655   "to the end of the next ]] are ignored for option parsing and short "
656   "usage messages.  They are used for generating verbose help or man pages. "
657   "The : character may not appear in the label. "
658   "The ? character must be specified as ?? in the label and the ]] character "
659   "must be specified as ]]]] in the description string. "
660   "Text between two \\b (backspace) characters indicates "
661   "that the text should be emboldened when displayed. "
662   "Text between two \\a (bell) characters indicates that the text should "
663   "be emphasized or italicized when displayed. "
664   "Text between two \\v (vertical tab) characters indicates "
665   "that the text should displayed in a fixed width font. "
666   "Text between two \\f (formfeed) characters will be replaced by the "
667     "output from the shell function whose name is that of the enclosed text.]"
668 "[+?All output from this interface is written to the standard error.]"
669 "[+?There are several group types:]{"
670   "[+1.?A group of the form "
671     "[-[\aversion\a]][\aflag\a[\anumber\a]]]]...[?\atext\a]]]] "
672     "appearing as the first group enables the extended interface. \aversion\a "
673     "specifies the interface version, currently \b1\b. The latest version is "
674     "assumed if \aversion\a is omitted. Future enhancements "
675     "may increment \aversion\a, but all versions will be supported. \atext\a "
676     "typically specifies an SCCS or CVS identification string. Zero or more "
677     "\aflags\a with optional \anumber\a values may be specified to control "
678     "option parsing. "
679     "The flags are:]{"
680       "[+c?Cache this \aoptstring\a for multiple passes. Used to optimize "
681 	"builtins that may be called many times within the same process.]"
682       "[+i?Ignore this \aoptstring\a when generating help. Used when "
683 	"combining \aoptstring\a values from multiple passes.]"
684       "[+l?Display only \alongname\a options in help messages.]"
685       "[+n?Associate -\anumber\a and +\anumber\a options with the first "
686         "option with numeric arguments.]"
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 successfully 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 "[-1cn?@(#)$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 specified, 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 "[v?Treat each \astring\a as a variable name and write the value in \b%B\b "
1104 	"format.  Cannot be used with \b-f\b.]"
1105 "\n"
1106 "\n[string ...]\n"
1107 "\n"
1108 "[+EXIT STATUS?]{"
1109 	"[+0?Successful completion.]"
1110 	"[+>0?An error occurred.]"
1111 "}"
1112 "[+SEE ALSO?\becho\b(1), \bprintf\b(1), \bread\b(1)]"
1113 ;
1114 
1115 const char sh_optprintf[] =
1116 "[-1c?\n@(#)$Id: printf (AT&T Research) 2006-10-26 $\n]"
1117 USAGE_LICENSE
1118 "[+NAME?printf - write formatted output]"
1119 "[+DESCRIPTION?\bprintf\b writes each \astring\a operand to "
1120 	"standard output using \aformat\a to control the output format.]"
1121 "[+?The \aformat\a operands supports the full range of ANSI C formatting "
1122 	"specifiers plus the following additional specifiers:]{"
1123 	"[+%b?Each character in the \astring\a operand is processed "
1124 		"specially as follows:]{"
1125 			"[+\\a?Alert character.]"
1126 			"[+\\b?Backspace character.]"
1127 			"[+\\c?Terminate output without appending newline. "
1128 			    "The remaining \astring\a operands are ignored.]"
1129 			"[+\\f?Formfeed character.]"
1130 			"[+\\n?Newline character.]"
1131 			"[+\\t?Tab character.]"
1132 			"[+\\v?Vertical tab character.]"
1133 			"[+\\\\?Backslash character.]"
1134 			"[+\\E?Escape character (ASCII octal 033).]"
1135 			"[+\\0\ax\a?The 8-bit character whose ASCII code is "
1136 				"the 1-, 2-, or 3-digit octal number \ax\a.]"
1137 		"}"
1138 	"[+%q?Output \astring\a quoted in a manner that it can be read in "
1139 		"by the shell to get back the same string.  However, empty "
1140 		"strings resulting from missing \astring\a operands will "
1141 		"not be quoted.]"
1142 	"[+%B?Treat the argument as a variable name and output the value "
1143 		"without converting it to a string.  This is most useful for "
1144 		"variables of type \b-b\b.]"
1145 	"[+%H?Output \astring\a with characters \b<\b, \b&\b, \b>\b, "
1146 		"\b\"\b, and non-printable characters properly escaped for "
1147 		"use in HTML and XML documents.]"
1148 	"[+%P?Treat \astring\a as an extended regular expression and  "
1149 		"convert it to a shell pattern.]"
1150 	"[+%R?Treat \astring\a as an shell pattern expression and  "
1151 		"convert it to an extended regular expression.]"
1152 	"[+%T?Treat \astring\a as a date/time string and format it.  The "
1153 		"\bT\b can be preceded by \b(\b\adformat\a\b)\b, where "
1154 		"\adformat\a is a date format as defined by the \bdate\b "
1155 		"command.]"
1156 	"[+%Z?Output a byte whose value is \b0\b.]"
1157 "}"
1158 "[+?When performing conversions of \astring\a to satisfy a numeric "
1159 	"format specifier, if the first character of \astring\a "
1160 	"is \b\"\b or \b'\b, then the value will be the numeric value "
1161 	"in the underlying code set of the character following the "
1162 	"\b\"\b or \b'\b.  Otherwise, \astring\a is treated like a shell "
1163 	"arithmetic expression and evaluated.]"
1164 "[+?If a \astring\a operand cannot be completed converted into a value "
1165 	"appropriate for that format specifier, an error will occur, "
1166 	"but remaining \astring\a operands will continue to be processed.]"
1167 "[+?In addition to the format specifier extensions, the following "
1168 	"extensions of ANSI-C are permitted in format specifiers:]{"
1169 	"[+-?The escape sequences \b\\E\b and \b\\e\b expand to the escape "
1170 		"character which is octal \b033\b in ASCII.]"
1171 	"[+-?The escape sequence \b\\c\b\ax\a expands to Control-\ax\a.]"
1172 	"[+-?The escape sequence \b\\C[.\b\aname\a\b.]]\b expands to "
1173 		"the collating element \aname\a.]"
1174 	"[+-?The escape sequence \b\\x{\b\ahex\a\b}\b expands to the "
1175 		"character corresponding to the hexidecimal value \ahex\a.]"
1176 	"[+-?The format modifier flag \b=\b can be used to center a field to "
1177 		"a specified width.  When the output is a terminal, the "
1178 		"character width is used rather than the number of bytes.]"
1179 	"[+-?Each of the integral format specifiers can have a third "
1180 		"modifier after width and precision that specifies the "
1181 		"base of the conversion from 2 to 64.  In this case the "
1182 		"\b#\b modifier will cause \abase\a\b#\b to be prepended to "
1183 		"the value.]"
1184 	"[+-?The \b#\b modifier can be used with the \bd\b specifier when "
1185 		"no base is specified cause the output to be written in units "
1186 		"of \b1000\b with a suffix of one of \bk M G T P E\b.]"
1187 	"[+-?The \b#\b modifier can be used with the \bi\b specifier to "
1188 		"cause the output to be written in units of \b1024\b with "
1189 		"a suffix of one of \bKi Mi Gi Ti Pi Ei\b.]"
1190 	"}"
1191 "[+?If there are more \astring\a operands than format specifiers, the "
1192 	"\aformat\a string is reprocessed from the beginning.  If there are "
1193 	"fewer \astring\a operands than format specifiers, then string "
1194 	"specifiers will be treated as if empty strings were supplied, "
1195 	"numeric conversions will be treated as if 0 were supplied, and "
1196 	"time conversions will be treated as if \bnow\b were supplied.]"
1197 "[+?\bprintf\b is equivalent to \bprint -f\b which allows additional "
1198 	"options to be specified.]"
1199 "\n"
1200 "\nformat [string ...]\n"
1201 "\n"
1202 "[+EXIT STATUS?]{"
1203 	"[+0?Successful completion.]"
1204 	"[+>0?An error occurred.]"
1205 "}"
1206 "[+SEE ALSO?\bdate\b(1), \bprint\b(1), \bread\b(1)]"
1207 ;
1208 
1209 const char sh_optpwd[] =
1210 "[-1c?\n@(#)$Id: pwd (AT&T Research) 1999-06-07 $\n]"
1211 USAGE_LICENSE
1212 "[+NAME?pwd - write working directory name]"
1213 "[+DESCRIPTION?\bpwd\b writes an absolute pathname of the current working "
1214 	"directory to standard output.   An absolute pathname is a "
1215 	"pathname that begins with \b/\b that does not contains any "
1216 	"\b.\b  or \b..\b components.]"
1217 "[+?If both \b-L\b and \b-P\b are specified, the last one specified will "
1218 	"be used.  If neither \b-P\b or \b-L\b is specified then the "
1219 	"behavior will be determined by the \bgetconf\b parameter "
1220 	"\bPATH_RESOLVE\b.  If \bPATH_RESOLVE\b is \bphysical\b, "
1221 	"then the behavior will be as if \b-P\b were specified.  Otherwise, "
1222 	"the behavior will be as if  \b-L\b were specified.]"
1223 "[L?The absolute pathname may contains symbolic link components.  This is "
1224 	"the default.]"
1225 "[P?The absolute pathname will not contain any symbolic link components.]"
1226 "[+EXIT STATUS?]{"
1227 	"[+0?Successful completion.]"
1228 	"[+>0?An error occurred.]"
1229 "}"
1230 "[+SEE ALSO?\bcd\b(1), \bgetconf\b(1)]"
1231 ;
1232 
1233 const char sh_optread[] =
1234 "[-1c?\n@(#)$Id: read (AT&T Research) 2006-12-19 $\n]"
1235 USAGE_LICENSE
1236 "[+NAME?read - read a line from standard input]"
1237 "[+DESCRIPTION?\bread\b reads a line from standard input and breaks it "
1238 	"into fields using the characters in value of the \bIFS\b variable "
1239 	"as separators.  The escape character, \b\\\b, is used to remove "
1240 	"any special meaning for the next character and for line continuation "
1241 	"unless the \b-r\b option is specified.]"
1242 "[+?If there are more variables than fields, the remaining variables are "
1243 	"set to empty strings.  If there are fewer variables than fields, "
1244 	"the leftover fields and their intervening separators are assigned "
1245 	"to the last variable.  If no \avar\a is specified then the variable "
1246 	"\bREPLY\b is used.]"
1247 "[+?When \avar\a has the binary attribute and \b-n\b or \b-N\b is specified, "
1248 	"the bytes that are read are stored directly into \bvar\b.]"
1249 "[+?If you specify \b?\b\aprompt\a after the first \avar\a, then \bread\b "
1250 	"will display \aprompt\a on standard error when standard input "
1251 	"is a terminal or pipe.]"
1252 "[A?Unset \avar\a and then create an indexed array containing each field in "
1253 	"the line starting at index 0.]"
1254 "[C?Unset \avar\a and read  \avar\a as a compound variable.]"
1255 "[d]:[delim?Read until delimiter \adelim\a instead of to the end of line.]"
1256 "[p?Read from the current co-process instead of standard input.  An end of "
1257 	"file causes \bread\b to disconnect the co-process so that another "
1258 	"can be created.]"
1259 "[r?Do not treat \b\\\b specially when processing the input line.]"
1260 "[s?Save a copy of the input as an entry in the shell history file.]"
1261 "[u]#[fd:=0?Read from file descriptor number \afd\a instead of standard input.]"
1262 "[t]:[timeout?Specify a timeout \atimeout\a in seconds when reading from "
1263 	"a terminal or pipe.]"
1264 "[n]#[nbyte?Read at most \ansize\a characters.  For binary fields \asize\a "
1265 	"will be in bytes.]"
1266 "[N]#[nbyte?Read exactly \ansize\a characters.  For binary fields \asize\a "
1267 	"will be in bytes.]"
1268 "[v?When reading from a terminal the value of the first variable is displayed "
1269 	"and used as a default value.]"
1270 "\n"
1271 "\n[var?prompt] [var ...]\n"
1272 "\n"
1273 "[+EXIT STATUS?]{"
1274 	"[+0? Successful completion.]"
1275 	"[+>0?End of file was detected or an error occurred.]"
1276 "}"
1277 "[+SEE ALSO?\bprint\b(1), \bprintf\b(1), \bcat\b(1)]"
1278 ;
1279 
1280 const char sh_optreadonly[] =
1281 "[-1c?\n@(#)$Id: readonly (AT&T Research) 2008-06-16 $\n]"
1282 USAGE_LICENSE
1283 "[+NAME?readonly - set readonly attribute on variables]"
1284 "[+DESCRIPTION?\breadonly\b sets the readonly attribute on each of "
1285 	"the variables specified by \aname\a which prevents their "
1286 	"values from being changed.  If \b=\b\avalue\a is specified, "
1287 	"the variable \aname\a is set to \avalue\a before the variable "
1288 	"is made readonly.]"
1289 "[+?Within a type definition, if the value is not specified, then a "
1290 	"value must be specified when creating each instance of the type "
1291         "and the value is readonly for each instance.]"
1292 "[+?If no \aname\as are specified then the names and values of all "
1293 	"readonly variables are written to standard output.]"
1294 "[+?\breadonly\b is built-in to the shell as a declaration command so that "
1295 	"field splitting and pathname expansion are not performed on "
1296 	"the arguments.  Tilde expansion occurs on \avalue\a.]"
1297 "[p?Causes the output to be in a form of \breadonly\b commands that can be "
1298 	"used as input to the shell to recreate the current set of "
1299 	"readonly variables.]"
1300 "\n"
1301 "\n[name[=value]...]\n"
1302 "\n"
1303 "[+EXIT STATUS?]{"
1304         "[+0?Successful completion.]"
1305         "[+>0?An error occurred.]"
1306 "}"
1307 
1308 "[+SEE ALSO?\bsh\b(1), \btypeset\b(1)]"
1309 ;
1310 
1311 const char sh_optreturn[] =
1312 "[-1c?\n@(#)$Id: return (AT&T Research) 1999-07-07 $\n]"
1313 USAGE_LICENSE
1314 "[+NAME?return - return from a function or dot script ]"
1315 "[+DESCRIPTION?\breturn\b is a shell special built-in that causes the "
1316 	"function or dot script that invokes it to exit.  "
1317 	"If \breturn\b is invoked outside of a function or dot script "
1318 	"it is equivalent to \bexit\b.]"
1319 "[+?If \breturn\b is invoked inside a function defined with the \bfunction\b "
1320 	"reserved word syntax, then any \bEXIT\b trap set within the "
1321 	"then function will be invoked in the context of the caller "
1322 	"before the function returns.]"
1323 "[+?If \an\a is given, it will be used to set the exit status.]"
1324 "\n"
1325 "\n[n]\n"
1326 "\n"
1327 "[+EXIT STATUS?If \an\a is specified, the exit status is the least significant "
1328 	"eight bits of the value of \an\a.  Otherwise, the exit status is the "
1329 	"exit status of preceding command.]"
1330 "[+SEE ALSO?\bbreak\b(1), \bexit\b(1)]"
1331 ;
1332 
1333 
1334 const char sh_optksh[] =
1335 "+[-1c?\n@(#)$Id: sh (AT&T Research) "SH_RELEASE" $\n]"
1336 USAGE_LICENSE
1337 "[+NAME?\b\f?\f\b - Shell, the standard command language interpreter]"
1338 "[+DESCRIPTION?\b\f?\f\b is a command language interpreter that "
1339 	"executes commands read from a command line string, the "
1340 	"standard input, or a specified file.]"
1341 "[+?If the \b-i\b option is present, or there are no \aarg\as and "
1342 	"the standard input and standard error are attached to a "
1343 	"terminal, the shell is considered to be interactive.]"
1344 "[+?The \b-s\b and \b-c\b options are mutually exclusive.  If the \b-c\b "
1345 	"option is specified, the first \aarg\a is the command-line string "
1346 	"and must be specified.  Any remaining \aarg\as will be used "
1347 	"to initialize \b$0\b and positional parameters.]"
1348 "[+?If the neither \b-s\b nor \b-c\b is specified, then the first \barg\b "
1349 	"will be the pathname of the file containing commands and \b$0\b "
1350 	"will be set to this value.  If there is no file with this pathname, "
1351 	"and this pathame does not contain a \b/\b, then the \bPATH\b "
1352 	"will be searched for an executable with this name.  Any remaining "
1353 	"\aarg\as will be used to initialize the positional parmaeters.]"
1354 "[+?Any option can use a \b+\b instead of a \b-\b to disable the corresponding "
1355 	"option.]"
1356 "[c?Read the commands from the first \aarg\a.]"
1357 "[i?Specifies that the shell is interactive.]"
1358 "[l?Invoke the shell as a login shell; \b/etc/profile\b and \b$HOME/.profile\b, "
1359 	"if they exist, are read before the first command.]"
1360 "[r\f:restricted\f?Invoke the shell in a restricted mode.  A restricted "
1361 	"shell does not permit any of the following:]{"
1362 	"[+-?Changing the working directory.]"
1363 	"[+-?Setting values or attributes of the variables \bSHELL\b, "
1364 		"\bENV\b, \bFPATH\b, or \bPATH\b.]"
1365 	"[+-?Executing any command whose name as a \b/\b in it.]"
1366 	"[+-?Redirecting output of a command with \b>\b, \b>|\b, "
1367 		"\b<>\b, or \b>>\b.]"
1368 	"[+-?Adding or deleting built-in commands or libraries with "
1369 		"\bbuiltin\b.]"
1370 	"[+-?Executing \bcommand -p\b \a...\a .]"
1371 	"}"
1372 "[s?Read the commands from standard input.  The positional parameters will be "
1373 	"initialized from \aarg\a.]"
1374 "[D\f:dump-strings\f?Do not execute the script, but output the set of double "
1375 	"quoted strings preceded by a \b$\b.  These strings are needed for "
1376 	"localization of the script to different locales.]"
1377 "[E?Reads the file "
1378 #if SHOPT_SYSRC
1379 	"\b/etc/ksh.kshrc\b, if it exists, as a profile, followed by "
1380 #endif
1381 	"\b${ENV-$HOME/.kshrc}\b, if it exists, as a profile. "
1382 	"On by default for interactive shells; use \b+E\b to disable.]"
1383 #if SHOPT_PFSH
1384 "[P?Invoke the shell as a profile shell.  See \bpfexec\b(1).]"
1385 #endif
1386 #if SHOPT_KIA
1387 "[R]:[file?Do not execute the script, but create a cross reference database "
1388 	"in \afile\a that can be used a separate shell script browser.  The "
1389 	"-R option requires a script to be specified as the first operand.]"
1390 #endif /* SHOPT_KIA */
1391 #if SHOPT_BASH
1392    "\fbash2\f"
1393 #endif
1394 "\fabc\f"
1395 "\n"
1396 "\n[arg ...]\n"
1397 "\n"
1398 "[+EXIT STATUS?If \b\f?\f\b executes command, the exit status will be that "
1399         "of the last command executed.  Otherwise, it will be one of "
1400         "the following:]{"
1401         "[+0?The script or command line to be executed consists entirely "
1402 		"of zero or more blank lines or comments.]"
1403         "[+>1-125?A noninteractive shell detected a syntax error, a variable "
1404 		"assignment error, or an error in a special built-in.]"
1405 	"[+126?\b-c\b and \b-s\b were not specified and the command script "
1406 		"was found on \bPATH\b but was not executable.]"
1407 	"[+127?\b-c\b and \b-s\b were not specified and the command script "
1408 		"corresponding to \aarg\a could not be found.]"
1409 "}"
1410 
1411 "[+SEE ALSO?\bset\b(1), \bbuiltin\b(1)]"
1412 ;
1413 const char sh_optset[] =
1414 "+[-1c?\n@(#)$Id: set (AT&T Research) 1999-09-28 $\n]"
1415 USAGE_LICENSE
1416 "[+NAME?set - set/unset options and positional parameters]"
1417 "[+DESCRIPTION?\bset\b sets or unsets options and positional parameters.  "
1418 	"Options that are specified with a \b-\b cause the options to "
1419 	"be set.  Options that are specified with a \b+\b cause the "
1420 	"option to be unset.]"
1421 "[+?\bset\b without any options or arguments displays the names and "
1422 	"values of all shell variables in the order of the collation "
1423 	"sequence in the current locale.  The values are quoted so that "
1424 	"they are suitable for reinput to the shell.]"
1425 "[+?If no \aarg\as are specified, not even the end of options argument \b--\b, "
1426 	"the positional parameters are unchanged.  Otherwise, unless "
1427 	"the \b-A\b options has been specified, the positional parameters "
1428 	"are replaced by the list of \aarg\as.  A first \aarg\a of "
1429 	"\b--\b is ignored when setting positional parameters.]"
1430 "[+?For backward compatibility, a \bset\b command without any options "
1431 	"specified whose first \aarg\a is \b-\b will turn off "
1432 	"the \b-v\b and \b-x\b options.  If any additional \aarg\as "
1433 	"are specified, they will replace the positional parameters.]"
1434 "[s?Sort the positional parameters.]"
1435 "[A]:[name?Assign the arguments sequentially to the array named by \aname\a "
1436 	"starting at subscript 0 rather than to the positional parameters.]"
1437 "\fabc\f"
1438 "[06:default?Restore all non-command line options to the default settings.]"
1439 "[07:state?List the current option state in the form of a \bset\b command "
1440 	"that can be executed to restore the state.]"
1441 "\n"
1442 "\n[arg ...]\n"
1443 "\n"
1444 "[+EXIT STATUS?]{"
1445         "[+0?No errors occurred.]"
1446         "[+>0?An error occurred.]"
1447 "}"
1448 
1449 "[+SEE ALSO?\btypeset\b(1), \bshift\b(1)]"
1450 ;
1451 
1452 
1453 
1454 const char sh_optshift[] =
1455 "[-1c?\n@(#)$Id: shift (AT&T Research) 1999-07-07 $\n]"
1456 USAGE_LICENSE
1457 "[+NAME?shift - shift positional parameters]"
1458 "[+DESCRIPTION?\bshift\b is a shell special built-in that shifts the "
1459 	"positional parameters to the left by the number of places "
1460 	"defined by \an\a, or \b1\b if \an\a is omitted.  The number of "
1461 	"positional parameters remaining will be reduced by the "
1462 	"number of places that are shifted.]"
1463 "[+?If \an\a is given, it will be evaluated as an arithmetic expression "
1464 	"to determinate the number of places to shift.  It is an error "
1465 	"to shift more than the number of positional parameters or a "
1466 	"negative number of places.]"
1467 "\n"
1468 "\n[n]\n"
1469 "\n"
1470 "[+EXIT STATUS?]{"
1471         "[+0?The positional parameters were successfully shifted.]"
1472         "[+>0?An error occurred.]"
1473 "}"
1474 "[+SEE ALSO?\bset\b(1)]"
1475 ;
1476 
1477 const char sh_optsleep[] =
1478 "[-1c?\n@(#)$Id: sleep (AT&T Research) 1999-04-07 $\n]"
1479 USAGE_LICENSE
1480 "[+NAME?sleep - suspend execution for an interval]"
1481 "[+DESCRIPTION?\bsleep\b suspends execution for at least the time specified "
1482 	"by \aseconds\a or until a \bSIGALRM\b signal is received.  "
1483 	"\aseconds\a can be specified as a floating point number but the "
1484 	"actual granularity depends on the underlying system, normally "
1485 	"around 1 millisecond.]"
1486 "\n"
1487 "\nseconds\n"
1488 "\n"
1489 "[+EXIT STATUS?]{"
1490 	"[+0?The execution was successfully suspended for at least \atime\a "
1491 	"seconds, or a \bSIGALRM\b signal was received.]"
1492 	"[+>0?An error occurred.]"
1493 "}"
1494 "[+SEE ALSO?\btime\b(1), \bwait\b(1)]"
1495 ;
1496 
1497 const char sh_opttrap[] =
1498 "[-1c?\n@(#)$Id: trap (AT&T Research) 1999-07-17 $\n]"
1499 USAGE_LICENSE
1500 "[+NAME?trap - trap signals and conditions]"
1501 "[+DESCRIPTION?\btrap\b is a special built-in that defines actions to be "
1502 	"taken when conditions such as receiving a signal occur.  Also, "
1503 	"\btrap\b can be used to display the current trap settings on "
1504 	"standard output.]"
1505 "[+?If \aaction\a is \b-\b, \btrap\b resets each \acondition\a "
1506 	"to the default value.  If \aaction\a is an empty string, the "
1507 	"shell ignores each of the \acondition\as if they arise. "
1508 	"Otherwise, the argument \aaction\a will be read and executed "
1509 	"by the shell as if it were processed by \beval\b(1) when one "
1510 	"of the corresponding conditions arise.  The action of the trap "
1511 	"will override any previous action associated with each specified "
1512 	"\acondition\a.  The value of \b$?\b is not altered by the trap "
1513 	"execution.]"
1514 "[+?\acondition\a can be the name or number of a signal, or one of the "
1515 	"following:]{"
1516 	"[+EXIT?This trap is executed when the shell exits.  If defined "
1517 		"within a function defined with the \bfunction\b reserved "
1518 		"word, the trap is executed in the caller's environment "
1519 		"when the function returns and the trap action is restored "
1520 		"to the value it had when it called the function.]"
1521 	"[+0?Same as EXIT.]"
1522 	"[+DEBUG?Executed before each simple command is executed but after "
1523 		"the arguments are expanded.]"
1524 	"[+ERR?Executed whenever \bset -e\b would cause the shell to exit.]"
1525 	"[+KEYBD?Executed when a key is entered from a terminal device.]"
1526 "}"
1527 "[+?Signal names are case insensitive and the \bsig\b prefix is optional.  "
1528 	"Signals that were ignored on entry to a noninteractive shell cannot "
1529 	"trapped or reset although doing so will not report an error.  The "
1530 	"use of signal numbers other than \b1\b, \b2\b, \b3\b, \b6\b, "
1531 	"\b9\b, \b14\b, and \b15\b is not portable.]"
1532 "[+?Although \btrap\b is a special built-in, specifying a condition that "
1533 	"the shell does not know about causes \btrap\b to exit with a "
1534 	"non-zero exit status, but does not terminate the invoking shell.]"
1535 "[+?If no \aaction\a or \acondition\as are specified then all the current "
1536 	"trap settings are written to standard output.]"
1537 "[p?Causes the current traps to be output in a format that can be processed "
1538 	"as input to the shell to recreate the current traps.]"
1539 "\n"
1540 "\n[action condition ...]\n"
1541 "\n"
1542 "[+EXIT STATUS?]{"
1543         "[+0?Successful completion.]"
1544         "[+>0?An error occurred.]"
1545 "}"
1546 
1547 "[+SEE ALSO?\bkill\b(1), \beval\b(1), \bsignal\b(3)]"
1548 ;
1549 
1550 const char sh_opttypeset[] =
1551 "+[-1c?\n@(#)$Id: typeset (AT&T Research) 2008-08-04 $\n]"
1552 USAGE_LICENSE
1553 "[+NAME?\f?\f - declare or display variables with attributes]"
1554 "[+DESCRIPTION?Without the \b-f\b option, \b\f?\f\b sets, unsets, "
1555 	"or displays attributes of variables as specified with the "
1556 	"options.  If the first option is specified with a \b-\b "
1557 	"then the attributes are set for each of the given \aname\as. "
1558 	"If the first option is specified with a \b+\b, then the specified "
1559 	"attributes are unset.  If \b=\b\avalue\a is specified value is "
1560 	"assigned before the attributes are set.]"
1561 "[+?When \b\f?\f\b is called inside a function defined with the "
1562 	"\bfunction\b reserved word, and \aname\a does not contain a "
1563 	"\b.\b, then a local variable statically scoped to  that function "
1564 	"will be created.]"
1565 "[+?Not all option combinations are possible.  For example, the numeric "
1566 	"options \b-i\b, \b-E\b, and \b-F\b cannot be specified with "
1567 	"the justification options \b-L\b, \b-R\b, and \b-Z\b.]"
1568 "[+?Note that the following preset aliases are set by the shell:]{"
1569 	"[+float?\b\f?\f -E\b.]"
1570 	"[+functions?\b\f?\f -f\b.]"
1571 	"[+integer?\b\f?\f -i\b.]"
1572 	"[+nameref?\b\f?\f -n\b.]"
1573 "}"
1574 "[+?If no \aname\as are specified then variables that have the specified "
1575 	"options are displayed.  If the first option is specified with "
1576 	"a leading \b-\b then the name and value of each variable is "
1577 	"written to standard output.  Otherwise, only the names are "
1578 	"written.  If no options are specified or just \b-p\b is "
1579 	"specified, then the names and attributes of all variables that have "
1580 	"attributes are written to standard output.  When \b-f\b is specified, "
1581 	"the names displayed will be function names.]"
1582 "[+?If \b-f\b is specified, then each \aname\a refers to a function "
1583 	"and the only valid options are \b-u\b and \b-t\b.  In this "
1584 	"case no \b=\b\avalue\a can be specified.]"
1585 "[+?\b\f?\f\b is built-in to the shell as a declaration command so that "
1586 	"field splitting and pathname expansion are not performed on "
1587 	"the arguments.  Tilde expansion occurs on \avalue\a.]"
1588 #if 1
1589 "[a]:?[type?Indexed array.  This is the default. If \b[\b\atype\a\b]]\b is "
1590     "specified, each subscript is interpreted as a value of type \atype\a.]"
1591 #else
1592 "[a?Indexed array. this is the default.]"
1593 #endif
1594 "[b?Each \aname\a may contain binary data.  Its value is the mime "
1595 	"base64 encoding of the data. It can be used with \b-Z\b, "
1596 	"to specify fixed sized fields.]"
1597 "[f?Each of the options and \aname\as refers to a function.]"
1598 "[i]#?[base:=10?An integer. \abase\a represents the arithmetic base "
1599 	"from 2 to 64.]"
1600 "[l?Convert uppercase character to lowercase.  Unsets \b-u\b attribute.  When "
1601 	"used with \b-i\b, \b-E\b, or \b-F\b indicates long variant.]"
1602 "[m?Move.  The value is the name of a variable whose value will be "
1603 	"moved to \aname\a.  The orignal variable will be unset.  Cannot be "
1604 	"used with any other options.]"
1605 "[n?Name reference.  The value is the name of a variable that \aname\a "
1606 	"references.  \aname\a cannot contain a \b.\b.  Cannot be use with "
1607 	"any other options.]"
1608 "[p?Causes the output to be in a format that can be used as input to the "
1609 	"shell to recreate the attributes for variables.]"
1610 "[r?Enables readonly.  Once enabled it cannot be disabled.  See "
1611 	"\breadonly\b(1).]"
1612 "[s?Used with \b-i\b to restrict integer size to short.]"
1613 "[t?When used with \b-f\b, enables tracing for each of the specified "
1614 	"functions.  Otherwise, \b-t\b is a user defined attribute and "
1615 	"has no meaning to the shell.]"
1616 "[u?Without \b-f\b or \b-i\b, converts lowercase character to uppercase "
1617 	"and unsets \b-l\b.  With \b-f\b specifies that \aname\a is a function "
1618 	"that hasn't been loaded yet.  With \b-i\b specifies that the "
1619 	"value will be displayed as an unsigned integer.]"
1620 "[x?Puts each \aname\a on the export list.  See \bexport\b(1).  \aname\a "
1621 	"cannot contain a \b.\b.]"
1622 "[A?Associative array.  Each \aname\a will converted to an associate "
1623 	"array.  If a variable already exists, the current value will "
1624 	"become index \b0\b.]"
1625 "[C?Compound variable.  Each \aname\a will be a compound variable.  If "
1626 	"\avalue\a names a compound variable it will be copied to \aname\a. "
1627 	"Otherwise if the variable already exists, it will first be unset.]"
1628 "[E]#?[n:=10?Floating point number represented in scientific notation. "
1629 	"\an\a specifies the number of significant figures when the "
1630 	"value is expanded.]"
1631 "[F]#?[n:=10?Floating point.  \an\a is the number of places after the "
1632 	"decimal point when the value is expanded.]"
1633 "[H?Hostname mapping.  Each \aname\a holds a native pathname.  Assigning a "
1634 	"UNIX format pathname will cause it to be converted to a pathname "
1635 	"suitable for the current host.  This has no effect when the "
1636 	"native system is UNIX.]"
1637 "[L]#?[n?Left justify.  If \an\a is given it represents the field width.  If "
1638 	"the \b-Z\b attribute is also specified, then leading zeros are "
1639 	"stripped.]"
1640 "[R]#?[n?Right justify.  If \an\a is given it represents the field width.  If "
1641 	"the \b-Z\b attribute is also specified, then zeros will "
1642 	"be used as the fill character.  Otherwise, spaces are used.]"
1643 "[X]#?[n:=10?Floating point number represented in hexadecimal notation. "
1644 	"\an\a specifies the number of significant figures when the "
1645 	"value is expanded.]"
1646 
1647 #ifdef SHOPT_TYPEDEF
1648 "[h]:[string?Used within a type definition to provide a help string  "
1649 	"for variable \aname\a.  Otherwise, it is ignored.]"
1650 "[S?Used with a type definition to indicate that the variable is shared by "
1651 	"each instance of the type.  When used inside a function defined "
1652 	"with the \bfunction\b reserved word, the specified variables "
1653 	"will have function static scope.  Otherwise, the variable is "
1654 	"unset prior to processing the assignment list.]"
1655 #endif
1656 "[T]:[tname?\atname\a is the name of a type name given to each \aname\a.]"
1657 "[Z]#?[n?Zero fill.  If \an\a is given it represents the field width.]"
1658 "\n"
1659 "\n[name[=value]...]\n"
1660 " -f [name...]\n"
1661 "\n"
1662 "[+EXIT STATUS?]{"
1663         "[+0?No errors occurred.]"
1664         "[+>0?An error occurred.]"
1665 "}"
1666 
1667 "[+SEE ALSO?\breadonly\b(1), \bexport\b(1)]"
1668 ;
1669 
1670 const char sh_optulimit[] =
1671 "[-1c?@(#)$Id: ulimit (AT&T Research) 2003-06-21 $\n]"
1672 USAGE_LICENSE
1673 "[+NAME?ulimit - set or display resource limits]"
1674 "[+DESCRIPTION?\bulimit\b sets or displays resource limits.  These "
1675 	"limits apply to the current process and to each child process "
1676 	"created after the resource limit has been set.  If \alimit\a "
1677 	"is specified, the resource limit is set, otherwise, its current value "
1678 	"is displayed on standard output.]"
1679 "[+?Increasing the limit for a resource usually requires special privileges.  "
1680 	"Some systems allow you to lower resource limits and later increase "
1681 	"them.  These are called soft limits.  Once a hard limit is "
1682 	"set the resource can not be increased.]"
1683 "[+?Different systems allow you to specify different resources and some "
1684 	"restrict how much you can raise the limit of the resource.]"
1685 "[+?The value of \alimit\a depends on the unit of the resource listed "
1686 	"for each resource.  In addition, \alimit\a can be \bunlimited\b "
1687 	"to indicate no limit for that resource.]"
1688 "[+?If you do not specify \b-H\b or \b-S\b, then \b-S\b is used for "
1689 	"listing and both \b-S\b and \b-H\b are used for setting resources.]"
1690 "[+?If you do not specify any resource, the default is \b-f\b.]"
1691 "[H?A hard limit is set or displayed.]"
1692 "[S?A soft limit is set or displayed.]"
1693 "[a?Displays all current resource limits]"
1694 "\flimits\f"
1695 "\n"
1696 "\n[limit]\n"
1697 "\n"
1698 "[+EXIT STATUS?]{"
1699 	"[+0?Successful completion.]"
1700 	"[+>0?A request for a higher limit was rejected or an error occurred.]"
1701 "}"
1702 
1703 "[+SEE ALSO?\bulimit\b(2), \bgetrlimit\b(2)]"
1704 ;
1705 
1706 const char sh_optumask[] =
1707 "[-1c?\n@(#)$Id: umask (AT&T Research) 1999-04-07 $\n]"
1708 USAGE_LICENSE
1709 "[+NAME?umask - get or set the file creation mask]"
1710 "[+DESCRIPTION?\bumask\b sets the file creation mask of the current "
1711 	"shell execution environment to the value specified by the "
1712 	"\amask\a operand.  This mask affects the file permission bits "
1713 	"of subsequently created files.  \amask\a can either be an "
1714 	"octal number or a symbolic value as described in \bchmod\b(1).  "
1715 	"If a symbolic value is given, the new file creation mask is the "
1716 	"complement of the result of applying \amask\a to the complement "
1717 	"of the current file creation mask.]"
1718 "[+?If \amask\a is not specified, \bumask\b writes the value of the "
1719 	"file creation mask for the current process to standard output.]"
1720 "[S?Causes the file creation mask to be written or treated as a symbolic value "
1721 	"rather than an octal number.]"
1722 "\n"
1723 "\n[mask]\n"
1724 "\n"
1725 "[+EXIT STATUS?]{"
1726 	"[+0?The file creation mask was successfully changed, or no "
1727 		"\amask\a operand was supplied.]"
1728 	"[+>0?An error occurred.]"
1729 "}"
1730 "[+SEE ALSO?\bchmod\b(1)]"
1731 ;
1732 const char sh_optuniverse[]	= " [name]";
1733 const char sh_optunset[] =
1734 "[-1c?\n@(#)$Id: unset (AT&T Research) 1999-07-07 $\n]"
1735 USAGE_LICENSE
1736 "[+NAME?unset - unset values and attributes of variables and functions]"
1737 "[+DESCRIPTION?For each \aname\a specified, \bunset\b  unsets the variable, "
1738 	"or function if \b-f\b is specified, from the current shell "
1739 	"execution environment.  Readonly variables cannot be unset.]"
1740 "[n?If \aname\a refers to variable that is a reference, the variable \aname\a "
1741 	"will be unset rather than the variable it references.  Otherwise, "
1742 	"is is equivalent to \b-v\b.]"
1743 "[f?\aname\a refers to a function name and the shell will unset the "
1744 	"function definition.]"
1745 "[v?\aname\a refers to a variable name and the shell will unset it and "
1746 	"remove it from the environment.  This is the default behavior.]"
1747 "\n"
1748 "\nname...\n"
1749 "\n"
1750 "[+EXIT STATUS?]{"
1751         "[+0?All \aname\as were successfully unset.]"
1752         "[+>0?One or more \aname\a operands could not be unset "
1753 	"or an error occurred.]"
1754 "}"
1755 
1756 "[+SEE ALSO?\btypeset\b(1)]"
1757 ;
1758 
1759 const char sh_optunalias[] =
1760 "[-1c?\n@(#)$Id: unalias (AT&T Research) 1999-07-07 $\n]"
1761 USAGE_LICENSE
1762 "[+NAME?unalias - remove alias definitions]"
1763 "[+DESCRIPTION?\bunalias\b removes the definition of each named alias "
1764 	"from the current shell execution environment, or all aliases if "
1765 	"\b-a\b is specified.  It will not affect any commands that "
1766 	"have already been read and subsequently executed.]"
1767 "[a?Causes all alias definitions to be removed.  \aname\a operands "
1768 	"are optional and ignored in this case.]"
1769 "\n"
1770 "\nname...\n"
1771 "\n"
1772 "[+EXIT STATUS?]{"
1773         "[+0?Successful completion.]"
1774         "[+>0?\b-a\b was not specified and one or more \aname\a operands "
1775 	"did not have an alias definition, or an error occurred.]"
1776 "}"
1777 
1778 "[+SEE ALSO?\balias\b(1)]"
1779 ;
1780 
1781 const char sh_optwait[]	=
1782 "[-1c?\n@(#)$Id: wait (AT&T Research) 1999-06-17 $\n]"
1783 USAGE_LICENSE
1784 "[+NAME?wait - wait for process or job completion]"
1785 "[+DESCRIPTION?\bwait\b with no operands, waits until all jobs "
1786 	"known to the invoking shell have terminated.  If one or more "
1787 	"\ajob\a operands are specified, \bwait\b waits until all of them "
1788 	"have completed.]"
1789 "[+?Each \ajob\a can be specified as one of the following:]{"
1790 	"[+\anumber\a?\anumber\a refers to a process id.]"
1791 	"[+-\anumber\a?\anumber\a refers to a process group id.]"
1792 	"[+%\anumber\a?\anumber\a refer to a job number.]"
1793 	"[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
1794 	"[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
1795 	"[+%+ \bor\b %%?Refers to the current job.]"
1796 	"[+%-?Refers to the previous job.]"
1797 "}"
1798 "[+?If one ore more \ajob\a operands is a process id or process group id "
1799 	"not known by the current shell environment, \bwait\b treats each "
1800 	"of them as if it were a process that exited with status 127.]"
1801 "\n"
1802 "\n[job ...]\n"
1803 "\n"
1804 "[+EXIT STATUS?If \await\a is invoked with one or more \ajob\as, and all of "
1805 	"them have terminated or were not known by the invoking shell, "
1806 	"the exit status of \bwait\b  will be that of the last \ajob\a.  "
1807 	"Otherwise, it will be one of the following:]{"
1808 	"[+0?\bwait\b utility was invoked with no operands and all "
1809 		"processes known by the invoking process have terminated.]"
1810 	"[+127?\ajob\a is a process id or process group id that is unknown "
1811 		"to the current shell environment.]"
1812 "}"
1813 
1814 "[+SEE ALSO?\bjobs\b(1), \bps\b(1)]"
1815 ;
1816 
1817 #if SHOPT_FS_3D
1818     const char sh_optvpath[]	= " [top] [base]";
1819     const char sh_optvmap[]	= " [dir] [list]";
1820 #endif /* SHOPT_FS_3D */
1821 
1822 const char sh_optwhence[] =
1823 "[-1c?\n@(#)$Id: whence (AT&T Research) 2007-04-24 $\n]"
1824 USAGE_LICENSE
1825 "[+NAME?whence - locate a command and describe its type]"
1826 "[+DESCRIPTION?Without \b-v\b, \bwhence\b writes on standard output an "
1827 	"absolute pathname, if any, corresponding to \aname\a based "
1828 	"on the complete search order that the shell uses.  If \aname\a "
1829 	"is not found, then no output is produced.]"
1830 "[+?If \b-v\b is specified, the output will also contain information "
1831 	"that indicates how the given \aname\a would be interpreted by "
1832 	"the shell in the current execution environment.]"
1833 "[a?Displays all uses for each \aname\a rather than the first.]"
1834 "[f?Do not check for functions.]"
1835 "[p?Do not check to see if \aname\a is a reserved word, a built-in, "
1836 	"an alias, or a function.  This turns off the \b-v\b option.]"
1837 "[q?Quiet mode. Returns 0 if all arguments are built-ins, functions, or are "
1838 	"programs found on the path.]"
1839 "[v?For each name you specify, the shell displays a line that indicates "
1840 	"if that name is one of the following:]{"
1841 	"[+?Reserved word]"
1842 	"[+?Alias]"
1843 	"[+?Built-in]"
1844 	"[+?Undefined function]"
1845 	"[+?Function]"
1846 	"[+?Tracked alias]"
1847 	"[+?Program]"
1848 "}"
1849 "\n"
1850 "\nname  ...\n"
1851 "\n"
1852 "[+EXIT STATUS?]{"
1853 	"[+0?Each \aname\a was found by the shell.]"
1854 	"[+1?One or more \aname\as were not found by the shell.]"
1855 	"[+>1?An error occurred.]"
1856 "}"
1857 
1858 "[+SEE ALSO?\bcommand\b(1)]"
1859 ;
1860 
1861 
1862 const char e_alrm1[]		= "alarm -r %s +%.3g\n";
1863 const char e_alrm2[]		= "alarm %s %.3f\n";
1864 const char e_baddisc[]		= "%s: invalid discipline function";
1865 const char e_nospace[]		= "out of memory";
1866 const char e_nofork[]		= "cannot fork";
1867 const char e_nosignal[]		= "%s: unknown signal name";
1868 const char e_condition[]	= "condition(s) required";
1869 const char e_cneedsarg[]	= "-c requires argument";
1870