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