da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/***********************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* This software is part of the ast package *
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner* Copyright (c) 1982-2010 AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* and is licensed under the *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Common Public License, Version 1.0 *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* by AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* A copy of the License is available at *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* http://www.opensource.org/licenses/cpl1.0.txt *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Information and Software Systems Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* AT&T Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Florham Park NJ *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* David Korn <dgk@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin***********************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#pragma prototyped
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include <shell.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include <signal.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "defs.h"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "shtable.h"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "ulimit.h"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "name.h"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "version.h"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if KSHELL
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# include "builtins.h"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# include "jobs.h"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# include "FEATURE/cmds"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# define bltin(x) (b_##x)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* The following is for builtins that do not accept -- options */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# define Bltin(x) (B_##x)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# define bltin(x) 0
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if defined(SHOPT_CMDLIB_DIR) && !defined(SHOPT_CMDLIB_HDR)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# define SHOPT_CMDLIB_HDR <cmdlist.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define Q(f) #f /* libpp cpp workaround -- fixed 2005-04-11 */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define CMDLIST(f) SH_CMDLIB_DIR "/" Q(f), NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#undef basename
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#undef dirname
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The order up through "[" is significant
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst struct shtable3 shtab_builtins[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "login", NV_BLTIN|BLT_ENV|BLT_SPC, Bltin(login),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "exec", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(exec),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "set", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(set),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ":", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(true),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "true", NV_BLTIN|BLT_ENV, bltin(true),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "command", NV_BLTIN|BLT_ENV|BLT_EXIT, bltin(command),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "cd", NV_BLTIN|BLT_ENV, bltin(cd),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "break", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(break),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "continue", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(break),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "typeset", NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(typeset),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "test", NV_BLTIN|BLT_ENV, bltin(test),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[", NV_BLTIN|BLT_ENV, bltin(test),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "let", NV_BLTIN|BLT_ENV, bltin(let),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "export", NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(readonly),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin ".", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(dot_cmd),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "return", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(return),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_BASH
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "local", NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(typeset),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _bin_newgrp || _usr_bin_newgrp
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "newgrp", NV_BLTIN|BLT_ENV|BLT_SPC, Bltin(login),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* _bin_newgrp || _usr_bin_newgrp */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "alias", NV_BLTIN|BLT_SPC|BLT_DCL, bltin(alias),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "hash", NV_BLTIN|BLT_SPC|BLT_DCL, bltin(alias),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "enum", NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(enum),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "eval", NV_BLTIN|BLT_ENV|BLT_SPC|BLT_EXIT,bltin(eval),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "exit", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(return),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "fc", NV_BLTIN|BLT_ENV|BLT_EXIT, bltin(hist),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "hist", NV_BLTIN|BLT_ENV|BLT_EXIT, bltin(hist),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "readonly", NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(readonly),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shift", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(shift),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "trap", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(trap),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "unalias", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(unalias),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "unset", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(unset),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "builtin", NV_BLTIN, bltin(builtin),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_ECHOPRINT
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "echo", NV_BLTIN|BLT_ENV, bltin(print),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "echo", NV_BLTIN|BLT_ENV, Bltin(echo),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* SHOPT_ECHOPRINT */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifdef JOBS
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# ifdef SIGTSTP
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "bg", NV_BLTIN|BLT_ENV, bltin(bg),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "fg", NV_BLTIN|BLT_ENV|BLT_EXIT, bltin(bg),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "disown", NV_BLTIN|BLT_ENV, bltin(bg),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "kill", NV_BLTIN|BLT_ENV, bltin(kill),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# else
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "/bin/kill", NV_BLTIN|BLT_ENV, bltin(kill),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# endif /* SIGTSTP */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "jobs", NV_BLTIN|BLT_ENV, bltin(jobs),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* JOBS */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "false", NV_BLTIN|BLT_ENV, bltin(false),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "getopts", NV_BLTIN|BLT_ENV, bltin(getopts),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "print", NV_BLTIN|BLT_ENV, bltin(print),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "printf", NV_BLTIN|BLT_ENV, bltin(printf),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "pwd", NV_BLTIN, bltin(pwd),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "read", NV_BLTIN|BLT_ENV, bltin(read),
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "sleep", NV_BLTIN, bltin(sleep),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "alarm", NV_BLTIN, bltin(alarm),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "ulimit", NV_BLTIN|BLT_ENV, bltin(ulimit),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "umask", NV_BLTIN|BLT_ENV, bltin(umask),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifdef _cmd_universe
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "universe", NV_BLTIN|BLT_ENV, bltin(universe),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* _cmd_universe */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_FS_3D
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "vpath", NV_BLTIN|BLT_ENV, bltin(vpath),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "vmap", NV_BLTIN|BLT_ENV, bltin(vpath),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* SHOPT_FS_3D */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "wait", NV_BLTIN|BLT_ENV|BLT_EXIT, bltin(wait),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "type", NV_BLTIN|BLT_ENV, bltin(whence),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "whence", NV_BLTIN|BLT_ENV, bltin(whence),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifdef SHOPT_CMDLIB_HDR
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include SHOPT_CMDLIB_HDR
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(basename)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(chmod)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(dirname)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin CMDLIST(getconf)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(head)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(mkdir)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(logname)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(cat)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(cmp)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(cut)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(uname)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(wc)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin CMDLIST(sync)
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz#endif
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz#if SHOPT_REGRESS
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "__regress__", NV_BLTIN|BLT_ENV, bltin(__regress__),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "", 0, 0
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin};
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_set[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[a?Set the export attribute for each variable whose name does not "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "contain a \b.\b that you assign a value in the current shell "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "environment.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[b?The shell writes a message to standard error as soon it detects that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a background job completes rather than waiting until the next prompt.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[e?A simple command that has an non-zero exit status will cause the shell "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to exit unless the simple command is:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[++?contained in an \b&&\b or \b||\b list.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[++?the command immediately following \bif\b, \bwhile\b, or \buntil\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[++?contained in the pipeline following \b!\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[f?Pathname expansion is disabled.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[h?Obsolete. Causes each command whose name has the syntax of an "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "alias to become a tracked alias when it is first encountered.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[k?This is obsolete. All arguments of the form \aname\a\b=\b\avalue\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "are removed and placed in the variable assignment list for "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the command. Ordinarily, variable assignments must precede "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "command arguments.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[m?When enabled, the shell runs background jobs in a separate process "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "group and displays a line upon completion. This mode is enabled "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "by default for interactive shells on systems that support job "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "control.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[n?The shell reads commands and checks for syntax errors, but does "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "not execute the command. Usually specified on command invocation.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[o]:?[option?If \aoption\a is not specified, the list of options and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "their current settings will be written to standard output. When "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "invoked with a \b+\b the options will be written in a format "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that can be reinput to the shell to restore the settings. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "This option can be repeated to enable/disable multiple options. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "The value of \aoption\a must be one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+allexport?Equivalent to \b-a\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+bgnice?Runs background jobs at lower priorities.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+braceexpand?Equivalent to \b-B\b.] "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+emacs?Enables/disables \bemacs\b editing mode.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+errexit?Equivalent to \b-e\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+globstar?Equivalent to \b-G\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+gmacs?Enables/disables \bgmacs\b editing mode. \bgmacs\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "editing mode is the same as \bemacs\b editing mode "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "except for the handling of \b^T\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_BASH
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+hashall?Equivalent to \b-h\b and \b-o trackall\b. Available "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "in bash compatibility mode only.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+history?Enable command history. Available in bash "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "compatibility mode only. On by default in interactive "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shells.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_HISTEXPAND
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+histexpand?Equivalent to \b-H\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+ignoreeof?Prevents an interactive shell from exiting on "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "reading an end-of-file.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+keyword?Equivalent to \b-k\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+markdirs?A trailing \b/\b is appended to directories "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "resulting from pathname expansion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+monitor?Equivalent to \b-m\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+multiline?Use multiple lines when editing lines that are "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "longer than the window width.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+noclobber?Equivalent to \b-C\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+noexec?Equivalent to \b-n\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+noglob?Equivalent to \b-f\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+nolog?This has no effect. It is provided for backward "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "compatibility.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+notify?Equivalent to \b-b\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+nounset?Equivalent to \b-u\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_BASH
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+onecmd?Equivalent to \b-t\b. Available in bash compatibility "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "mode only.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+physical?Equivalent to \b-P\b. Available in bash "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "compatibility mode only.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+posix?Turn on POSIX compatibility. Available in bash "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "compatibility mode only. Bash in POSIX mode is not the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "same as ksh.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+pipefail?A pipeline will not complete until all components "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of the pipeline have completed, and the exit status "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of the pipeline will be the value of the last "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "command to exit with non-zero exit status, or will "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "be zero if all commands return zero exit status.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+privileged?Equivalent to \b-p\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+showme?Simple commands preceded by a \b;\b will be traced "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "as if \b-x\b were enabled but not executed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+trackall?Equivalent to \b-h\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+verbose?Equivalent to \b-v\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+vi?Enables/disables \bvi\b editing mode.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+viraw?Does not use canonical input mode when using \bvi\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "edit mode.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+xtrace?Equivalent to \b-x\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Privileged mode. Disabling \b-p\b sets the effective user id to the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "real user id, and the effective group id to the real group id. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Enabling \b-p\b restores the effective user and group ids to their "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "values when the shell was invoked. The \b-p\b option is on "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "whenever the real and effective user id is not equal or the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "real and effective group id is not equal. User profiles are "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "not processed when \b-p\b is enabled.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[r?restricted. Enables restricted shell. This option cannot be unset once "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "enabled.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[t?Obsolete. The shell reads one command and then exits.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[u?If enabled, the shell displays an error message when it tries to expand "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a variable that is unset.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[v?Verbose. The shell displays its input onto standard error as it "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "reads it.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[x?Execution trace. The shell will display each command after all "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "expansion and before execution preceded by the expanded value "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of the \bPS4\b parameter.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_BASH
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\fbash1\f"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_BRACEPAT
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[B?Enable {...} group expansion. On by default.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[C?Prevents existing regular files from being overwritten using the \b>\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "redirection operator. The \b>|\b redirection overrides this "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bnoclobber\b option.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[G?Causes \b**\b by itself to also match all sub-directories during pathname "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "expansion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_HISTEXPAND
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[H?Enable \b!\b-style history expansion similar to \bcsh\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optbreak[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: break (AT&T Research) 1999-04-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?break - break out of loop ]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bbreak\b is a shell special built-in that exits the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "smallest enclosing \bfor\b, \bselect\b, \bwhile\b, or \buntil\b loop, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "or the \an\a-th enclosing loop if \an\a is specified. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Execution continues at the command following the loop(s).]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \an\a is given, it must be a positive integer >= 1. If \an\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is larger than the number of enclosing loops, the last enclosing "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "loop will be exited.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[n]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?0]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bcontinue\b(1), \breturn\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optcont[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: continue (AT&T Research) 1999-04-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?continue - continue execution at top of the loop]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bcontinue\b is a shell special built-in that continues "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "execution at the top of smallest enclosing enclosing \bfor\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bselect\b, \bwhile\b, or \buntil\b loop, if any; or the top of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the \an\a-th enclosing loop if \an\a is specified.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \an\a is given, it must be a positive integer >= 1. If \an\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is larger than the number of enclosing loops, the last enclosing "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin " loop will be used.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[n]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bbreak\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optalarm[] = "r [varname seconds]";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optalias[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: alias (AT&T Research) 1999-07-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?alias - define or display aliases]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\balias\b creates or redefines alias definitions "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "or writes the existing alias definitions to standard output. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "An alias definitions provides a string value that will replace "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a command name when the command is read. Alias names can "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "contain any printable character which is not special to the shell. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "If an alias value ends in a space or tab, then the word "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "following the command name the alias replaces is also checked "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to see whether it is an alias.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If no \aname\as are specified then the names and values of all "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "aliases are written to standard output. Otherwise, for "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "each \aname\a that is specified, and \b=\b\avalue\a is not "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specified, the current value of the alias corresponding to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\aname\a is written to standard output. If \b=\b\avalue\a is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specified, the alias \aname\a will be created or redefined.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\balias\b is built-in to the shell as a declaration command so that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "field splitting and pathname expansion are not performed on "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the arguments. Tilde expansion occurs on \avalue\a. An alias "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "definition only affects scripts read by the current shell "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "environment. It does not effect scripts run by this shell.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Causes the output to be in the form of alias commands that can be used "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "as input to the shell to recreate the current aliases.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[t?Used for tracked aliases. These are aliases that connect a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "command name to the pathname of the command and are reset "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "when the \bPATH\b variable is unset. The tracked aliases feature is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "now obsolete.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[x?Ignored, this option is obsolete.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[name[=value]...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?One or more \aname\a operands did not have an alias "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "definition, or an error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bsh\b(1), \bunalias\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optbuiltin[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: builtin (AT&T Research) 1999-07-10 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?builtin - add, delete, or display shell built-ins]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bbuiltin\b can be used to add, delete, or display "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "built-in commands in the current shell environment. A built-in command "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "executes in the current shell process and can have side effects in the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "current shell. On most systems, the invocation time for built-in "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "commands is one or two orders of magnitude less than commands that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "create a separate process.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?For each \apathname\a specified, the basename of the pathname "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "determines the name of the built-in. For each basename, the shell looks "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "for a C level function in the current shell whose name is determined by "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "prepending \bb_\b to the built-in name. If \apathname\a contains a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b/\b, then the built-in is bound to this pathname. A built-in bound to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a pathname will only be executed if \apathname\a is the first "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "executable found during a path search. Otherwise, built-ins are found "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "prior to performing the path search.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If no \apathname\a operands are specified, then \bbuiltin\b displays "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the current list of built-ins, or just the special built-ins if \b-s\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is specified, on standard output. The full pathname for built-ins that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "are bound to pathnames are displayed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Libraries containing built-ins can be specified with the \b-f\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "option. If the library contains a function named \blib_init\b(), this "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "function will be invoked with argument \b0\b when the library is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "loaded. The \blib_init\b() function can load built-ins by invoking an "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "appropriate C level function. In this case there is no restriction on "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the C level function name.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?The C level function will be invoked with three arguments. The first "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "two are the same as \bmain\b() and the third one is a pointer.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\bbuiltin\b cannot be invoked from a restricted shell.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[d?Deletes each of the specified built-ins. Special built-ins cannot be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "deleted.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[f]:[lib?On systems with dynamic linking, \alib\a names a shared "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "library to load and search for built-ins. Libraries are search for in "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b$PATH\b and system dependent library directories. The system "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "dependent shared library prefix and/or suffix may be omitted. Once a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "library is loaded, its symbols become available for the current and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "subsequent invocations of \bbuiltin\b. Multiple libraries can be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specified with separate invocations of \bbuiltin\b. Libraries are "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "searched in the reverse order in which they are specified.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[s?Display only the special built-ins.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[pathname ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?All \apathname\a operands and \b-f\b options processed "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "successfully.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bwhence\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optcd[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: cd (AT&T Research) 1999-06-05 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?cd - change working directory ]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bcd\b changes the current working directory of the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "current shell environment.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?In the first form with one operand, if \adirectory\a begins with "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b/\b, or if the first component is \b.\b or \b..\b, the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "directory will be changed to this directory. If directory is \b-\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the directory will be changed to the last directory visited. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Otherwise, if the \bCDPATH\b environment variable is set, \bcd\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "searches for \adirectory\a relative to each directory named in "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the colon separated list of directories defined by \bCDPATH\b. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "If \bCDPATH\b not set, \bcd\b changes to the directory specified "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "by \adirectory\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?In the second form, the first occurrence of the string \aold\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "contained in the pathname of the present working directory "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is replaced by the string \anew\a and the resulting string "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is used as the directory to which to change.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When invoked without operands and when the \bHOME\b environment "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "variable is set to a nonempty value, the directory named by "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the \bHOME\b environment variable will be used. If \bHOME\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is empty or unset, \bcd\b will fail.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When \bcd\b is successful, the \bPWD\b environment variable will be set "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to the name of an absolute pathname that does not contain any "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b..\b components corresponding to the new directory. The "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "environment variable \bOLDPWD\b will be set to the previous "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "value of \bPWD\b. If the new directory is found by searching "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the directories named by \bCDPATH\b, or if \adirectory\a is \b-\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "or if the two operand form is used, the new value of \bPWD\b will be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "written to standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If both \b-L\b and \b-P\b are specified, the last one specified will "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "be used. If neither \b-P\b or \b-L\b is specified then the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "behavior will be determined by the \bgetconf\b parameter "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bPATH_RESOLVE\b. If \bPATH_RESOLVE\b is \bphysical\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "then the behavior will be as if \b-P\b were specified. Otherwise, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the behavior will be as if \b-L\b were specified.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[L?Handle each pathname component \b..\b in a logical fashion by moving "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "up one level by name in the present working directory.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[P?The present working directory is first converted to an absolute pathname "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that does not contain symbolic link components and symbolic name "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "components are expanded in the resulting directory name.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[directory]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"old new\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Directory successfully changed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bpwd\b(1), \bgetconf\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optcommand[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: command (AT&T Research) 2003-08-01 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?command - execute a simple command]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?Without \b-v\b or \b-V\b, \bcommand\b executes \acommand\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "with arguments given by \aarg\a, suppressing the shell function lookup "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that normally occurs. In addition, if \acommand\a is a special "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "built-in command, then the special properties are removed so that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "failures will not cause the script that executes it to terminate.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?With the \b-v\b or \b-V\b options, \bcommand\b is equivalent to the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bwhence\b(1) command.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Causes a default path to be searched rather than the one defined by the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "value of \bPATH\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[v?Equivalent to \bwhence\b \acommand\a [\aarg\a ...]].]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[x?If \acommand\a fails because there are too many \aarg\as, it will be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "invoked multiple times with a subset of the arguments on each "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "invocation. Arguments that occur prior to the first word that expand "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to multiple arguments and arguments that occur after the last word "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that expands to multiple arguments will be passed on each invocation. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "The exit status will be the maximum invocation exit status.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[V?Equivalent to \bwhence \b-v\b \acommand\a [\aarg\a ...]].]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[command [arg ...]]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If \acommand\a is invoked, the exit status of \bcommand\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be that of \acommand\a. Otherwise, it will be one of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?\bcommand\b completed successfully.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?\b-v\b or \b-V\b has been specified and an error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+126?\acommand\a was found but could not be invoked.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+127?\acommand\a could not be found.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bwhence\b(1), \bgetconf\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optdot[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?@(#)$Id: \b.\b (AT&T Research) 2000-04-02 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?\b.\b - execute commands in the current environment]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\b.\b is a special built-in command that executes commands "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "from a function or a file in the current environment.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \aname\a refers to a function defined with the \bfunction\b \aname\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "syntax, the function executes in the current environment as "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "if it had been defined with the \aname\a\b()\b syntax so that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "there is no scoping. Otherwise, commands from the file defined "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "by \aname\a are executed in the current environment. Note that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the complete script is read before it begins to execute so that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "any aliases defined in this script will not take effect until "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the script completes execution.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When \aname\a refers to a file, the \bPATH\b variable is searched "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "for the file containing commands. In this case execute permission "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is not required for \aname\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If any \aarg\as are specified, these become the positional parameters "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "for the duration of the function or script and are restored "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "upon completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n name [arg ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If \aname\a is found, then the exit status is that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of the last command executed. Otherwise, since this is a special "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "built-in, an error will cause a non-interactive shell to exit with "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a non-zero exit status. An interactive shell returns a non-zero exit "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "status to indicate an error.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bcommand\b(1), \bksh\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifndef ECHOPRINT
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin const char sh_optecho[] = " [-n] [arg...]";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* !ECHOPRINT */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_opteval[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: eval (AT&T Research) 1999-07-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?eval - create a shell command and process it]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\beval\b is a shell special built-in command that constructs "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a command by concatenating the \aarg\as together, separating each "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "with a space. The resulting string is then taken as input to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the shell and evaluated in the current environment. Note that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "command words are expanded twice; once to construct \aarg\a, and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "again when the shell executes the constructed command.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?It is not an error if \aarg\a is not given.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[arg...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If \aarg\a is not specified, the exit status is \b0\b. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Otherwise, it is the exit status of the command defined by the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\aarg\a operands.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bexec\b(1), \btrap\b(1), \b.\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optexec[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: exec (AT&T Research) 1999-07-10 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?exec - execute command, open/close and duplicate file descriptors]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bexec\b is a special built-in command that can be used to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "manipulate file descriptors or to replace the current shell "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "with a new command.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \acommand\a is specified, then the current shell process will be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "replaced by \acommand\a rather than running \acommand\a and waiting "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "for it to complete. Note that there is no need to use "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bexec\b to enhance performance since the shell implicitly "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "uses the exec mechanism internally whenever possible.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If no operands are specified, \bexec\b can be used to open or "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "close files, or to manipulate file descriptors from \b0\b to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b9\b in the current shell environment using the standard "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "redirection mechanism available with all commands. The "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "close-on-exec flags will be set on file descriptor numbers "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "greater than \b2\b that are opened this way so that they "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be closed when another program is invoked.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Because \bexec\b is a special command, any failure will cause the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "script that invokes it to exit. This can be prevented by "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "invoking \bexec\b from the \bcommand\b utility.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\bexec\b cannot be invoked from a restricted shell to create "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "files or to open a file for writing or appending.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[c?Clear all environment variables before executions except variable "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "assignments that are part of the current \bexec\b command.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[a]:[name?\bargv[0]]\b will be set to \aname\a for \acommand\a]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[command [arg ...]]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If \acommand\a is specified, \bexec\b does not return. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Otherwise, the exit status is one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?All I/O redirections were successful.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bcommand\b(1), \beval\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optexit[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: exit (AT&T Research) 1999-07-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?exit - exit the current shell]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bexit\b is shell special built-in that causes the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shell that invokes it to exit. Before exiting the shell, if the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bEXIT\b trap is set it will be invoked.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \an\a is given, it will be used to set the exit status.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[n]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If \an\a is specified, the exit status is the least significant "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "eight bits of the value of \an\a. Otherwise, the exit status is the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "exit status of preceding command. When invoked inside a trap, the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "preceding command means the command that invoked the trap.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bbreak\b(1), \breturn\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optexport[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: export (AT&T Research) 1999-07-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?export - set export attribute on variables]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bexport\b sets the export attribute on each of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the variables specified by \aname\a which causes them "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to be in the environment of subsequently executed commands. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "If \b=\b\avalue\a is specified, the variable \aname\a is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "set to \avalue\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If no \aname\as are specified then the names and values of all "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "exported variables are written to standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\bexport\b is built-in to the shell as a declaration command so that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "field splitting and pathname expansion are not performed on "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the arguments. Tilde expansion occurs on \avalue\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Causes the output to be in the form of \bexport\b commands that can be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "used as input to the shell to recreate the current exports.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[name[=value]...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bsh\b(1), \btypeset\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optgetopts[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin":[-1c?\n@(#)$Id: getopts (AT&T Research) 2005-01-01 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-author?Glenn Fowler <gsf@research.att.com>]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?\f?\f - parse utility options]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?The \bgetopts\b utility can be used to retrieve options and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "arguments from a list of arguments given by \aargs\a or the positional "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "parameters if \aargs\a is omitted. It can also generate usage messages "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "and a man page for the command based on the information in \aoptstring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Each time it is invoked, the \bgetopts\b utility places the value "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of the next option in the shell variable specified by the \aname\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "operand and the index of the next argument to be processed in the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shell variable \bOPTIND\b. When the shell is invoked \bOPTIND\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is initialized to \b1\b. When an option requires or permits an option "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "argument, \bgetopts\b places the option argument in the shell "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "variable \bOPTARG\b. Otherwise \bOPTARG\b is set to \b1\b when the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "option is set and \b0\b when the option is unset.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?The \aoptstring\a string consists of alpha-numeric characters, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the special characters +, -, ?, :, and <space>, or character groups "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "enclosed in [...]]. Character groups may be nested in {...}. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Outside of a [...]] group, a single new-line followed by zero or "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "more blanks is ignored. One or more blank lines separate the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "options from the command argument synopsis.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Each [...]] group consists of an optional label, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "optional attributes separated by :, and an "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "optional description string following ?. The characters from the ? "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to the end of the next ]] are ignored for option parsing and short "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "usage messages. They are used for generating verbose help or man pages. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "The : character may not appear in the label. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "The ? character must be specified as ?? in the label and the ]] character "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "must be specified as ]]]] in the description string. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Text between two \\b (backspace) characters indicates "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that the text should be emboldened when displayed. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Text between two \\a (bell) characters indicates that the text should "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "be emphasized or italicized when displayed. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Text between two \\v (vertical tab) characters indicates "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that the text should displayed in a fixed width font. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Text between two \\f (formfeed) characters will be replaced by the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "output from the shell function whose name is that of the enclosed text.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?All output from this interface is written to the standard error.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?There are several group types:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+1.?A group of the form "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[-[\aversion\a]][\aflag\a[\anumber\a]]]]...[?\atext\a]]]] "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "appearing as the first group enables the extended interface. \aversion\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specifies the interface version, currently \b1\b. The latest version is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "assumed if \aversion\a is omitted. Future enhancements "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "may increment \aversion\a, but all versions will be supported. \atext\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "typically specifies an SCCS or CVS identification string. Zero or more "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\aflags\a with optional \anumber\a values may be specified to control "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "option parsing. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "The flags are:]{"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[++?Arguments beginning with + are considered options.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+c?Cache this \aoptstring\a for multiple passes. Used to optimize "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "builtins that may be called many times within the same process.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+i?Ignore this \aoptstring\a when generating help. Used when "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "combining \aoptstring\a values from multiple passes.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+l?Display only \alongname\a options in help messages.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "[+n?Associate -\anumber\a and +\anumber\a options with the first "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "option with numeric arguments.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+o?The \b-\b option character prefix is optional (supports "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "obsolete \bps\b(1) option syntax.)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+p?\anumber\a specifies the number of \b-\b characters that must "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "prefix long option names. The default is \b2\b; \b0\b, \b1\b or "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b2\b are accepted (e.g., \bp0\b for \bdd\b(1) and \bp1\b for "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bfind\b(1).)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+s?\anumber\a specifies the \b--??man\b section number, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b1\b by default.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+2.?An option specification of the form "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[\aoption\a[!]][=\anumber\a]][:\alongname\a]][?\atext\a]]]]. In this "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "case the first field is the option character; this is the value returned "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "in the \aname\a operand when the option is matched. If there is no "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "option character then a two or more digit number should be specified. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "This number will be returned as the value of the \aname\a operand if the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "long option is matched. If \aoption\a is followed by \b!\b then the option "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "character sense is the inverse of the longname sense. For options that do "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "not take values \bOPTARG\b will be set to \b0\b for \b!\b inverted option "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "characters and \b1\b otherwise. =\anumber\a optionally specifies a number to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "be returned in the \aname\a operand instead of the option character. A "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "longname is specified by \b--\b\alongname\a and is matched by the shortest "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "non-ambiguous prefix of all long options. * in the \alongname\a field "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "indicates that only characters up to that point need to match, provided "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "any additional characters match exactly. The enclosing [ and ]] can be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "omitted for an option that does not have a longname or descriptive text.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+3.?An option argument specification. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Options that take arguments can be followed by : (string value) or # "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "(numeric value) and an option argument specification. An option argument "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specification consists of the option argument name as field 1. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "The remaining \b:\b separated fields are a type name and zero or more of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the special attribute words \blistof\b, \boneof\b, and \bignorecase\b. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "A default option value may be specified in the final field as "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b:=\b\adefault\a. The option argument specification may be followed "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "by a list of option value descriptions enclosed in braces. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "A long option that takes an argument is specified as "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b--\b\alongname\a=\avalue\a. If the : or # is followed by ? then the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "option argument is optional. If only the option character form is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specified then the optional argument value is not set if the next "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "argument starts with - or +.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+4.?A option value description.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+5.?A argument specification. A list of valid option argument values "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "can be specified by enclosing them inside a {...} following "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the option argument specification. Each of the permitted "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "values can be specified with a [...]] containing the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "value followed by a description.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+6.?A group of the form [+\\n...]] will display the characters "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "representing ... in fixed with font without adding line breaks.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+7.?A group of the form [+\aname\a?\atext\a]] specifies a section "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\aname\a with descriptive \atext\a. If \aname\a is omitted then "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\atext\a is placed in a new paragraph.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+8.?A group of the form [-\aname\a?\atext\a]] specifies entries "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "for the \bIMPLEMENTATION\b section.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[+?A leading : character in \aoptstring\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "affects the way errors are handled. If an option character or longname "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "argument not specified in \aoptstring\a is encountered when processing "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "options, the shell variable whose name is \aname\a will be set to the ? "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "character. The shell variable \bOPTARG\b will be set to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the character found. If an option argument is missing or has an invalid "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "value, then \aname\a will be set to the : character and the shell variable "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bOPTARG\b will be set to the option character found. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Without the leading :, \aname\a will be set to the ? character, \bOPTARG\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be unset, and an error message will be written to standard error "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "when errors are encountered.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[+?A leading + character or a + following a leading : in \aoptstring\a "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "specifies that arguments beginning with + will also be considered options.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?The end of options occurs when:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+1.?The special argument \b--\b is encountered.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+2.?An argument that does not begin with a \b-\b is encountered.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+3.?A help argument is specified.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+4.?An error is encountered.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \bOPTIND\b is set to the value \b1\b, a new set of arguments "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "can be used.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\bgetopts\b can also be used to generate help messages containing command "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "usage and detailed descriptions. Specify \aargs\a as:]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"{ "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-???To generate a usage synopsis.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+--?????To generate a verbose usage message.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+--????man?To generate a formatted man page.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+--????api?To generate an easy to parse usage message.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+--????html?To generate a man page in \bhtml\b format.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+--????nroff?To generate a man page in \bnroff\b format.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+--????usage?List the current \aoptstring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+--??????\aname\a?List \bversion=\b\an\a, \an\a>0, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "if the option \aname\a is recognized by \bgetopts\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When the end of options is encountered, \bgetopts\b exits with a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "non-zero return value and the variable \bOPTIND\b is set to the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "index of the first non-option argument.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"a:[name?Use \aname\a instead of the command name in usage messages.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\nopstring name [args...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?An option specified was found.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+1?An end of options was encountered.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+2?A usage or information message was generated.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optbg[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?@(#)$Id: bg (AT&T Research) 2000-04-02 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?bg - resume jobs in the background]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bbg\b places the given \ajob\as into the background "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "and sends them a \bCONT\b signal to start them running.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \ajob\a is omitted, the most recently started or stopped "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "background job is resumed or continued in the background.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Each \ajob\a can be specified as one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\anumber\a?\anumber\a refers to a process id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-\anumber\a?\anumber\a refers to a process group id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\anumber\a?\anumber\a refer to a job number.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%+ \bor\b %%?Refers to the current job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%-?Refers to the previous job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[job ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?If all background jobs are started.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?If one more jobs does not exist or there are no background "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "jobs.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bwait\b(1), \bfg\b(1), \bdisown\b(1), \bjobs\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optfg[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?@(#)$Id: fg (AT&T Research) 2000-04-02 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?fg - move jobs to the foreground]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bfg\b places the given \ajob\as into the foreground "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "in sequence and sends them a \bCONT\b signal to start each running.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \ajob\a is omitted, the most recently started or stopped "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "background job is moved to the foreground.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Each \ajob\a can be specified as one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\anumber\a?\anumber\a refers to a process id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-\anumber\a?\anumber\a refers to a process group id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\anumber\a?\anumber\a refer to a job number.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%+ \bor\b %%?Refers to the current job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%-?Refers to the previous job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[job ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If \bfg\b brings one or more jobs into the foreground, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the exit status of \bfg\b will be that of the last \ajob\a. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "If one or more jobs does not exist or has completed, \bfg\b will "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "return a non-zero exit status.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bwait\b(1), \bbg\b(1), \bjobs\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optdisown[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?@(#)$Id: disown (AT&T Research) 2000-04-02 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?disown - disassociate a job with the current shell]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bdisown\b prevents the current shell from sending "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a \bHUP\b signal to each of the given \ajob\as when "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the current shell terminates a login session.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \ajob\a is omitted, the most recently started or stopped "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "background job is used.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Each \ajob\a can be specified as one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\anumber\a?\anumber\a refers to a process id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-\anumber\a?\anumber\a refers to a process group id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\anumber\a?\anumber\a refer to a job number.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%+ \bor\b %%?Refers to the current job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%-?Refers to the previous job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[job ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "[+0?If all jobs are successfully disowned.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?If one more \ajob\as does not exist.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bwait\b(1), \bbg\b(1), \bjobs\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optjobs[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?@(#)$Id: jobs (AT&T Research) 2000-04-02 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?jobs - display status of jobs]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bjobs\b displays information about specified \ajob\as "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that were started by the current shell environment on standard "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "output. The information contains the job number enclosed in "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[...]], the status, and the command line that started the job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \ajob\a is omitted, \bjobs\b displays the status of all stopped jobs, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "background jobs, and all jobs whose status has changed since last "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "reported by the shell.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When \bjobs\b reports the termination status of a job, the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shell removes the jobs from the list of known jobs in "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the current shell environment.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Each \ajob\a can be specified as one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\anumber\a?\anumber\a refers to a process id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-\anumber\a?\anumber\a refers to a process group id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\anumber\a?\anumber\a refer to a job number.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%+ \bor\b %%?Refers to the current job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%-?Refers to the previous job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[l?\bjobs\b displays process id's after the job number in addition "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to the usual information]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[n?Only the jobs whose status has changed since the last prompt "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is displayed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?The process group leader id's for the specified jobs are displayed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[job ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?The information for each job is written to standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?One or more jobs does not exist.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bwait\b(1), \bps\b(1), \bfg\b(1), \bbg\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_opthist[] =
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[-1cn?@(#)$Id: hist (AT&T Research) 2000-04-02 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?\f?\f - process command history list]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\b\f?\f\b lists, edits, or re-executes, commands "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "previously entered into the current shell environment.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?The command history list references commands by number. The first number "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "in the list is selected arbitrarily. The relationship of a number "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to its command does not change during a login session. When the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "number reaches 32767 the number wraps around to 1 but "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "maintains the ordering.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When commands are edited (when the \b-l\b option is not specified), the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "resulting lines will be entered at the end of the history list and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "then reexecuted by the current shell. The \b\f?\f\b command that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "caused the editing will not be entered into the history list. If the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "editor returns a non-zero exit status, this will suppress the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "entry into the history list and the command reexecution. Command "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "line variable assignments and redirections affect both the \f?\f "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "command and the commands that are reexecuted.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\afirst\a and \alast\a define the range of commands. \afirst\a and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\alast\a can be one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\anumber\a?A positive number representing a command "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "number. A \b+\b sign can precede \anumber\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-\anumber\a?A negative number representing a command "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that was executed \anumber\a commands previously. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "For example, \b-1\b is the previous command.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\astring\a?\astring\a indicates the most recently "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "entered command that begins with \astring\a. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\astring\a should not contain an \b=\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \afirst\a is omitted, the previous command is used, unless \b-l\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is specified, in which case it will default to \b-16\b and \alast\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will default to \b-1\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \afirst\a is specified and \alast\a is omitted, then \alast\a will "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "default to \afirst\a unless \b-l\b is specified in which case "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "it will default to \b-1\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If no editor is specified, then the editor specfied by the \bHISTEDIT\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "variable will be used if set, or the \bFCEDIT\b variable will be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "used if set, otherwise, \bed\b will be used.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[e]:[editor?\aeditor\a specifies the editor to use to edit the history "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "command. A value of \b-\b for \aeditor\a is equivalent to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specifiying the \b-s\b option.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[l?List the commands rather than editing and reexecuting them.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[N]#[num?Start at \anum\a commands back.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[n?Suppress the command numbers when the commands are listed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_HISTEXPAND
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Writes the result of history expansion for each operand to standard "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "output. All other options are ignored.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[r?Reverse the order of the commands.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[s?Reexecute the command without invoking an editor. In this case "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "an operand of the form \aold\a\b=\b\anew\a can be specified "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to change the first occurrence of the string \aold\a in the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "command to \anew\a before reexecuting the command.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[first [last] ]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If a command is reexecuted, the exit status is that of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the command that gets reexecuted. Otherwise, it is one of the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successfully completion of the listing.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bksh\b(1), \bsh\b(1), \bed\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optkill[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: kill (AT&T Research) 1999-06-17 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?kill - terminate or signal process]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?With the first form in which \b-l\b is not specified, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bkill\b sends a signal to one or more processes specified by "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\ajob\a. This normally terminates the processes unless the signal "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is being caught or ignored.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?A \ajob\a can be specified as one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\anumber\a?\anumber\a refers to a process id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-\anumber\a?\anumber\a refers to a process group id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\anumber\a?\anumber\a refer to a job number.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%+ \bor\b %%?Refers to the current job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%-?Refers to the previous job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If the signal is not specified with either the \b-n\b or the \b-s\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "option, the \bSIGTERM\b signal is used.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \b-l\b is specified, and no \aarg\a is specified, then \bkill\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "writes the list of signals to standard output. Otherwise, \aarg\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "can be either a signal name, or a number representing either a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "signal number or exit status for a process that was terminated "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "due to a signal. If a name is given the corresponding signal "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "number will be written to standard output. If a number is given "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the corresponding signal name will be written to standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[l?List signal names or signal numbers rather than sending signals as "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "described above. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "The \b-n\b and \b-s\b options cannot be specified.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[n]#[signum?Specify a signal number to send. Signal numbers are not "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "portable across platforms, except for the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?No signal]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+1?\bHUP\b]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+2?\bINT\b]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+3?\bQUIT\b]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+6?\bABRT\b]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+9?\bKILL\b]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+14?\bALRM\b]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+15?\bTERM\b]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[s]:[signame?Specify a signal name to send. The signal names are derived "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "from their names in \b<signal.h>\b without the \bSIG\b prefix and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "are case insensitive. \bkill -l\b will generate the list of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "signals on the current platform.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\njob ...\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin" -l [arg ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?At least one matching process was found for each \ajob\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "operand, and the specified signal was successfully sent to at "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "least one matching process.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bps\b(1), \bjobs\b(1), \bkill\b(2), \bsignal\b(2)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optlet[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?@(#)$Id: let (AT&T Research) 2000-04-02 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?let - evaluate arithmetic expressions]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\blet\b evaluates each \aexpr\a in the current "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shell environment as an arithmetic expression using ANSI C "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "syntax. Variables names are shell variables and they "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "are recursively evaluated as arithmetic expressions to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "get numerical values.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\blet\b has been made obsolete by the \b((\b...\b))\b syntax "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of \bksh\b(1) which does not require quoting of the operators "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to pass them as command arguments.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[expr ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?The last \aexpr\a evaluates to a non-zero value.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?The last \aexpr\a evaluates to \b0\b or an error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bexpr\b(1), \btest\b(1), \bksh\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optprint[] =
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[-1c?\n@(#)$Id: print (AT&T Research) 2008-11-26 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?print - write arguments to standard output]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?By default, \bprint\b writes each \astring\a operand to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "standard output and appends a newline character.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[+?Unless, the \b-r\b or \b-f\b option is specified, each \b\\\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "character in each \astring\a operand is processed specially as "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "follows:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\a?Alert character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\b?Backspace character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\c?Terminate output without appending newline. The "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "remaining \astring\a operands are ignored.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\f?Formfeed character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\n?Newline character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\t?Tab character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\v?Vertical tab character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\\\?Backslash character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\E?Escape character (ASCII octal 033).]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\0\ax\a?The 8-bit character whose ASCII code is the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "1-, 2-, or 3-digit octal number \ax\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If both \b-e\b and \b-r\b are specified, the last one specified is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the one that is used.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When the \b-f\b option is specified and there are more \astring\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "operands than format specifiers, the format string is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "reprocessed from the beginning. If there are fewer \astring\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "operands than format specifiers, then outputting will end "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "at the first unneeded format specifier.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[e?Unless \b-f\b is specified, process \b\\\b sequences in each \astring\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "operand as described above. This is the default behavior.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[n?Do not append a new-line character to the output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[f]:[format?Write the \astring\a arguments using the format string "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\aformat\a and do not append a new-line. See \bprintf\b for "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "details on how to specify \aformat\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Write to the current co-process instead of standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[r?Do not process \b\\\b sequences in each \astring\a operand as described "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "above.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[s?Write the output as an entry in the shell history file instead of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[u]:[fd:=1?Write to file descriptor number \afd\a instead of standard output.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[v?Treat each \astring\a as a variable name and write the value in \b%B\b "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "format. Cannot be used with \b-f\b.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[C?Treat each \astring\a as a variable name and write the value in \b%#B\b "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "format. Cannot be used with \b-f\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[string ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\becho\b(1), \bprintf\b(1), \bread\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optprintf[] =
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[-1c?\n@(#)$Id: printf (AT&T Research) 2009-02-02 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?printf - write formatted output]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bprintf\b writes each \astring\a operand to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "standard output using \aformat\a to control the output format.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?The \aformat\a operands supports the full range of ANSI C formatting "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specifiers plus the following additional specifiers:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%b?Each character in the \astring\a operand is processed "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specially as follows:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\a?Alert character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\b?Backspace character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\c?Terminate output without appending newline. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "The remaining \astring\a operands are ignored.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\f?Formfeed character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\n?Newline character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\t?Tab character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\v?Vertical tab character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\\\?Backslash character.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\E?Escape character (ASCII octal 033).]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\\0\ax\a?The 8-bit character whose ASCII code is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the 1-, 2-, or 3-digit octal number \ax\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%q?Output \astring\a quoted in a manner that it can be read in "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "by the shell to get back the same string. However, empty "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "strings resulting from missing \astring\a operands will "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "not be quoted.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%B?Treat the argument as a variable name and output the value "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "without converting it to a string. This is most useful for "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "variables of type \b-b\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%H?Output \astring\a with characters \b<\b, \b&\b, \b>\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b\"\b, and non-printable characters properly escaped for "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "use in HTML and XML documents.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%P?Treat \astring\a as an extended regular expression and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "convert it to a shell pattern.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%R?Treat \astring\a as an shell pattern expression and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "convert it to an extended regular expression.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%T?Treat \astring\a as a date/time string and format it. The "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bT\b can be preceded by \b(\b\adformat\a\b)\b, where "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\adformat\a is a date format as defined by the \bdate\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "command.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%Z?Output a byte whose value is \b0\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When performing conversions of \astring\a to satisfy a numeric "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "format specifier, if the first character of \astring\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is \b\"\b or \b'\b, then the value will be the numeric value "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "in the underlying code set of the character following the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b\"\b or \b'\b. Otherwise, \astring\a is treated like a shell "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "arithmetic expression and evaluated.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[+?If a \astring\a operand cannot be completely converted into a value "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "appropriate for that format specifier, an error will occur, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "but remaining \astring\a operands will continue to be processed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?In addition to the format specifier extensions, the following "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "extensions of ANSI-C are permitted in format specifiers:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?The escape sequences \b\\E\b and \b\\e\b expand to the escape "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "character which is octal \b033\b in ASCII.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?The escape sequence \b\\c\b\ax\a expands to Control-\ax\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?The escape sequence \b\\C[.\b\aname\a\b.]]\b expands to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the collating element \aname\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?The escape sequence \b\\x{\b\ahex\a\b}\b expands to the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "character corresponding to the hexidecimal value \ahex\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?The format modifier flag \b=\b can be used to center a field to "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "a specified width.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+-?The format modifier flag \bL\b can be used with the \bc\b and "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "\bs\b formats to treat precision as character width instead "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "of byte count.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?Each of the integral format specifiers can have a third "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "modifier after width and precision that specifies the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "base of the conversion from 2 to 64. In this case the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b#\b modifier will cause \abase\a\b#\b to be prepended to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the value.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?The \b#\b modifier can be used with the \bd\b specifier when "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "no base is specified cause the output to be written in units "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of \b1000\b with a suffix of one of \bk M G T P E\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?The \b#\b modifier can be used with the \bi\b specifier to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "cause the output to be written in units of \b1024\b with "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a suffix of one of \bKi Mi Gi Ti Pi Ei\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If there are more \astring\a operands than format specifiers, the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\aformat\a string is reprocessed from the beginning. If there are "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "fewer \astring\a operands than format specifiers, then string "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specifiers will be treated as if empty strings were supplied, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "numeric conversions will be treated as if 0 were supplied, and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "time conversions will be treated as if \bnow\b were supplied.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\bprintf\b is equivalent to \bprint -f\b which allows additional "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "options to be specified.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\nformat [string ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bdate\b(1), \bprint\b(1), \bread\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optpwd[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: pwd (AT&T Research) 1999-06-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?pwd - write working directory name]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bpwd\b writes an absolute pathname of the current working "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "directory to standard output. An absolute pathname is a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "pathname that begins with \b/\b that does not contains any "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b.\b or \b..\b components.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If both \b-L\b and \b-P\b are specified, the last one specified will "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "be used. If neither \b-P\b or \b-L\b is specified then the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "behavior will be determined by the \bgetconf\b parameter "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bPATH_RESOLVE\b. If \bPATH_RESOLVE\b is \bphysical\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "then the behavior will be as if \b-P\b were specified. Otherwise, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the behavior will be as if \b-L\b were specified.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[L?The absolute pathname may contains symbolic link components. This is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the default.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[P?The absolute pathname will not contain any symbolic link components.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bcd\b(1), \bgetconf\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optread[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: read (AT&T Research) 2006-12-19 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?read - read a line from standard input]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bread\b reads a line from standard input and breaks it "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "into fields using the characters in value of the \bIFS\b variable "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "as separators. The escape character, \b\\\b, is used to remove "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "any special meaning for the next character and for line continuation "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "unless the \b-r\b option is specified.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If there are more variables than fields, the remaining variables are "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "set to empty strings. If there are fewer variables than fields, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the leftover fields and their intervening separators are assigned "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "to the last variable. If no \avar\a is specified then the variable "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bREPLY\b is used.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When \avar\a has the binary attribute and \b-n\b or \b-N\b is specified, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the bytes that are read are stored directly into \bvar\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If you specify \b?\b\aprompt\a after the first \avar\a, then \bread\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will display \aprompt\a on standard error when standard input "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is a terminal or pipe.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[A?Unset \avar\a and then create an indexed array containing each field in "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the line starting at index 0.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[C?Unset \avar\a and read \avar\a as a compound variable.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[d]:[delim?Read until delimiter \adelim\a instead of to the end of line.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Read from the current co-process instead of standard input. An end of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "file causes \bread\b to disconnect the co-process so that another "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "can be created.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[r?Do not treat \b\\\b specially when processing the input line.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[s?Save a copy of the input as an entry in the shell history file.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[u]#[fd:=0?Read from file descriptor number \afd\a instead of standard input.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[t]:[timeout?Specify a timeout \atimeout\a in seconds when reading from "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a terminal or pipe.]"
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner"[n]#[nchar?Read at most \anchar\a characters. For binary fields \asize\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be in bytes.]"
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner"[N]#[nchar?Read exactly \anchar\a characters. For binary fields \asize\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be in bytes.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[v?When reading from a terminal the value of the first variable is displayed "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "and used as a default value.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[var?prompt] [var ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0? Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?End of file was detected or an error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bprint\b(1), \bprintf\b(1), \bcat\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optreadonly[] =
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[-1c?\n@(#)$Id: readonly (AT&T Research) 2008-06-16 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?readonly - set readonly attribute on variables]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\breadonly\b sets the readonly attribute on each of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the variables specified by \aname\a which prevents their "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "values from being changed. If \b=\b\avalue\a is specified, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the variable \aname\a is set to \avalue\a before the variable "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is made readonly.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[+?Within a type definition, if the value is not specified, then a "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "value must be specified when creating each instance of the type "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "and the value is readonly for each instance.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If no \aname\as are specified then the names and values of all "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "readonly variables are written to standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\breadonly\b is built-in to the shell as a declaration command so that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "field splitting and pathname expansion are not performed on "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the arguments. Tilde expansion occurs on \avalue\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Causes the output to be in a form of \breadonly\b commands that can be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "used as input to the shell to recreate the current set of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "readonly variables.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[name[=value]...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bsh\b(1), \btypeset\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optreturn[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: return (AT&T Research) 1999-07-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?return - return from a function or dot script ]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\breturn\b is a shell special built-in that causes the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "function or dot script that invokes it to exit. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "If \breturn\b is invoked outside of a function or dot script "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "it is equivalent to \bexit\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \breturn\b is invoked inside a function defined with the \bfunction\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "reserved word syntax, then any \bEXIT\b trap set within the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "then function will be invoked in the context of the caller "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "before the function returns.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \an\a is given, it will be used to set the exit status.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[n]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If \an\a is specified, the exit status is the least significant "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "eight bits of the value of \an\a. Otherwise, the exit status is the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "exit status of preceding command.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bbreak\b(1), \bexit\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optksh[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"+[-1c?\n@(#)$Id: sh (AT&T Research) "SH_RELEASE" $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?\b\f?\f\b - Shell, the standard command language interpreter]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\b\f?\f\b is a command language interpreter that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "executes commands read from a command line string, the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "standard input, or a specified file.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If the \b-i\b option is present, or there are no \aarg\as and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the standard input and standard error are attached to a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "terminal, the shell is considered to be interactive.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?The \b-s\b and \b-c\b options are mutually exclusive. If the \b-c\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "option is specified, the first \aarg\a is the command-line string "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "and must be specified. Any remaining \aarg\as will be used "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to initialize \b$0\b and positional parameters.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If the neither \b-s\b nor \b-c\b is specified, then the first \barg\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be the pathname of the file containing commands and \b$0\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be set to this value. If there is no file with this pathname, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "and this pathame does not contain a \b/\b, then the \bPATH\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be searched for an executable with this name. Any remaining "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\aarg\as will be used to initialize the positional parmaeters.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Any option can use a \b+\b instead of a \b-\b to disable the corresponding "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "option.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[c?Read the commands from the first \aarg\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[i?Specifies that the shell is interactive.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[l?Invoke the shell as a login shell; \b/etc/profile\b and \b$HOME/.profile\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "if they exist, are read before the first command.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[r\f:restricted\f?Invoke the shell in a restricted mode. A restricted "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shell does not permit any of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?Changing the working directory.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?Setting values or attributes of the variables \bSHELL\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bENV\b, \bFPATH\b, or \bPATH\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?Executing any command whose name as a \b/\b in it.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?Redirecting output of a command with \b>\b, \b>|\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b<>\b, or \b>>\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?Adding or deleting built-in commands or libraries with "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bbuiltin\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-?Executing \bcommand -p\b \a...\a .]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[s?Read the commands from standard input. The positional parameters will be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "initialized from \aarg\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[D\f:dump-strings\f?Do not execute the script, but output the set of double "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "quoted strings preceded by a \b$\b. These strings are needed for "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "localization of the script to different locales.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[E?Reads the file "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#if SHOPT_SYSRC
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "\b/etc/ksh.kshrc\b, if it exists, as a profile, followed by "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#endif
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "\b${ENV-$HOME/.kshrc}\b, if it exists, as a profile. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "On by default for interactive shells; use \b+E\b to disable.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_PFSH
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[P?Invoke the shell as a profile shell. See \bpfexec\b(1).]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_KIA
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[R]:[file?Do not execute the script, but create a cross reference database "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "in \afile\a that can be used a separate shell script browser. The "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "-R option requires a script to be specified as the first operand.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* SHOPT_KIA */
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz#if SHOPT_REGRESS
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[I:regress]:[intercept?Enable the regression test \aintercept\a. Must be "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "the first command line option(s).]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_BASH
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\fbash2\f"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\fabc\f"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"?"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[T?Enable implementation specific test code defined by mask.]#[mask]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[arg ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If \b\f?\f\b executes command, the exit status will be that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of the last command executed. Otherwise, it will be one of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?The script or command line to be executed consists entirely "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of zero or more blank lines or comments.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>1-125?A noninteractive shell detected a syntax error, a variable "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "assignment error, or an error in a special built-in.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+126?\b-c\b and \b-s\b were not specified and the command script "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "was found on \bPATH\b but was not executable.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+127?\b-c\b and \b-s\b were not specified and the command script "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "corresponding to \aarg\a could not be found.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bset\b(1), \bbuiltin\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optset[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"+[-1c?\n@(#)$Id: set (AT&T Research) 1999-09-28 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?set - set/unset options and positional parameters]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bset\b sets or unsets options and positional parameters. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Options that are specified with a \b-\b cause the options to "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "be set. Options that are specified with a \b+\b cause the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "option to be unset.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\bset\b without any options or arguments displays the names and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "values of all shell variables in the order of the collation "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "sequence in the current locale. The values are quoted so that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "they are suitable for reinput to the shell.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If no \aarg\as are specified, not even the end of options argument \b--\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the positional parameters are unchanged. Otherwise, unless "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the \b-A\b options has been specified, the positional parameters "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "are replaced by the list of \aarg\as. A first \aarg\a of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b--\b is ignored when setting positional parameters.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?For backward compatibility, a \bset\b command without any options "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specified whose first \aarg\a is \b-\b will turn off "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the \b-v\b and \b-x\b options. If any additional \aarg\as "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "are specified, they will replace the positional parameters.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[s?Sort the positional parameters.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[A]:[name?Assign the arguments sequentially to the array named by \aname\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "starting at subscript 0 rather than to the positional parameters.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\fabc\f"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[06:default?Restore all non-command line options to the default settings.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[07:state?List the current option state in the form of a \bset\b command "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "that can be executed to restore the state.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[arg ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?No errors occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\btypeset\b(1), \bshift\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optshift[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: shift (AT&T Research) 1999-07-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?shift - shift positional parameters]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bshift\b is a shell special built-in that shifts the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "positional parameters to the left by the number of places "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "defined by \an\a, or \b1\b if \an\a is omitted. The number of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "positional parameters remaining will be reduced by the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "number of places that are shifted.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \an\a is given, it will be evaluated as an arithmetic expression "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to determinate the number of places to shift. It is an error "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to shift more than the number of positional parameters or a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "negative number of places.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[n]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?The positional parameters were successfully shifted.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bset\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optsleep[] =
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[-1c?\n@(#)$Id: sleep (AT&T Research) 2009-03-12 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?sleep - suspend execution for an interval]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bsleep\b suspends execution for at least the time specified "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "by \aduration\a or until a \bSIGALRM\b signal is received. "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "\aduration\a may be one of the following:]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"{"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+integer?The number of seconds to sleep.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+floating point?The number of seconds to sleep. The actual "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "granularity depends on the underlying system, normally "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "around 1 millisecond.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+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 "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "where at least one of the duration parts must be specified.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+P\an\a\bW?An ISO 8601 duration specifying \an\a weeks.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+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 "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "ISO 8601 duration except that \bM\b specifies months, \bm\b before \bs\b or \bS\b "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "specifies minutes and after specifies milliseconds, \bu\b or \bU\b specifies "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "microseconds, and \bn\b specifies nanoseconds.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+date/time?Sleep until the \bdate\b(1) compatible date/time.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"}"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[s?Sleep until a signal or a timeout is received. If \aduration\a is omitted "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "or 0 then no timeout will be used.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"\n[ duration ]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+0?The execution was successfully suspended for at least \aduration\a "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "or a \bSIGALRM\b signal was received.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[+SEE ALSO?\bdate\b(1), \btime\b(1), \bwait\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_opttrap[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: trap (AT&T Research) 1999-07-17 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?trap - trap signals and conditions]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\btrap\b is a special built-in that defines actions to be "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "taken when conditions such as receiving a signal occur. Also, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\btrap\b can be used to display the current trap settings on "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \aaction\a is \b-\b, \btrap\b resets each \acondition\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to the default value. If \aaction\a is an empty string, the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shell ignores each of the \acondition\as if they arise. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Otherwise, the argument \aaction\a will be read and executed "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "by the shell as if it were processed by \beval\b(1) when one "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of the corresponding conditions arise. The action of the trap "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will override any previous action associated with each specified "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\acondition\a. The value of \b$?\b is not altered by the trap "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "execution.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\acondition\a can be the name or number of a signal, or one of the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+EXIT?This trap is executed when the shell exits. If defined "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "within a function defined with the \bfunction\b reserved "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "word, the trap is executed in the caller's environment "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "when the function returns and the trap action is restored "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to the value it had when it called the function.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Same as EXIT.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+DEBUG?Executed before each simple command is executed but after "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the arguments are expanded.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+ERR?Executed whenever \bset -e\b would cause the shell to exit.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+KEYBD?Executed when a key is entered from a terminal device.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Signal names are case insensitive and the \bsig\b prefix is optional. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Signals that were ignored on entry to a noninteractive shell cannot "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "trapped or reset although doing so will not report an error. The "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "use of signal numbers other than \b1\b, \b2\b, \b3\b, \b6\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b9\b, \b14\b, and \b15\b is not portable.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Although \btrap\b is a special built-in, specifying a condition that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the shell does not know about causes \btrap\b to exit with a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "non-zero exit status, but does not terminate the invoking shell.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If no \aaction\a or \acondition\as are specified then all the current "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "trap settings are written to standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Causes the current traps to be output in a format that can be processed "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "as input to the shell to recreate the current traps.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[action condition ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bkill\b(1), \beval\b(1), \bsignal\b(3)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_opttypeset[] =
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"+[-1c?\n@(#)$Id: typeset (AT&T Research) 2008-08-04 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?\f?\f - declare or display variables with attributes]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?Without the \b-f\b option, \b\f?\f\b sets, unsets, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "or displays attributes of variables as specified with the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "options. If the first option is specified with a \b-\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "then the attributes are set for each of the given \aname\as. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "If the first option is specified with a \b+\b, then the specified "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "attributes are unset. If \b=\b\avalue\a is specified value is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "assigned before the attributes are set.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?When \b\f?\f\b is called inside a function defined with the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\bfunction\b reserved word, and \aname\a does not contain a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b.\b, then a local variable statically scoped to that function "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be created.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Not all option combinations are possible. For example, the numeric "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "options \b-i\b, \b-E\b, and \b-F\b cannot be specified with "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the justification options \b-L\b, \b-R\b, and \b-Z\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Note that the following preset aliases are set by the shell:]{"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+compound?\b\f?\f -C\b.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+float?\b\f?\f -lE\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+functions?\b\f?\f -f\b.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "[+integer?\b\f?\f -li\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+nameref?\b\f?\f -n\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If no \aname\as are specified then variables that have the specified "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "options are displayed. If the first option is specified with "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "a leading \b-\b then the name and value of each variable is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "written to standard output. Otherwise, only the names are "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "written. If no options are specified or just \b-p\b is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "specified, then the names and attributes of all variables that have "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "attributes are written to standard output. When \b-f\b is specified, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the names displayed will be function names.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \b-f\b is specified, then each \aname\a refers to a function "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "and the only valid options are \b-u\b and \b-t\b. In this "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "case no \b=\b\avalue\a can be specified.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?\b\f?\f\b is built-in to the shell as a declaration command so that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "field splitting and pathname expansion are not performed on "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the arguments. Tilde expansion occurs on \avalue\a.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#if 1
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[a]:?[type?Indexed array. This is the default. If \b[\b\atype\a\b]]\b is "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "specified, each subscript is interpreted as a value of type \atype\a.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[a?Indexed array. this is the default.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[b?Each \aname\a may contain binary data. Its value is the mime "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "base64 encoding of the data. It can be used with \b-Z\b, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to specify fixed sized fields.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[f?Each of the options and \aname\as refers to a function.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[i]#?[base:=10?An integer. \abase\a represents the arithmetic base "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "from 2 to 64.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[l?Convert uppercase character to lowercase. Unsets \b-u\b attribute. When "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "used with \b-i\b, \b-E\b, or \b-F\b indicates long variant.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[m?Move. The value is the name of a variable whose value will be "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "moved to \aname\a. The orignal variable will be unset. Cannot be "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "used with any other options.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[n?Name reference. The value is the name of a variable that \aname\a "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "references. \aname\a cannot contain a \b.\b. Cannot be use with "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "any other options.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Causes the output to be in a format that can be used as input to the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shell to recreate the attributes for variables.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[r?Enables readonly. Once enabled it cannot be disabled. See "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\breadonly\b(1).]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[s?Used with \b-i\b to restrict integer size to short.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[t?When used with \b-f\b, enables tracing for each of the specified "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "functions. Otherwise, \b-t\b is a user defined attribute and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "has no meaning to the shell.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[u?Without \b-f\b or \b-i\b, converts lowercase character to uppercase "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "and unsets \b-l\b. With \b-f\b specifies that \aname\a is a function "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that hasn't been loaded yet. With \b-i\b specifies that the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "value will be displayed as an unsigned integer.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[x?Puts each \aname\a on the export list. See \bexport\b(1). \aname\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "cannot contain a \b.\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[A?Associative array. Each \aname\a will converted to an associate "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "array. If a variable already exists, the current value will "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "become index \b0\b.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[C?Compound variable. Each \aname\a will be a compound variable. If "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "\avalue\a names a compound variable it will be copied to \aname\a. "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "Otherwise if the variable already exists, it will first be unset.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[E]#?[n:=10?Floating point number represented in scientific notation. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\an\a specifies the number of significant figures when the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "value is expanded.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[F]#?[n:=10?Floating point. \an\a is the number of places after the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "decimal point when the value is expanded.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[H?Hostname mapping. Each \aname\a holds a native pathname. Assigning a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "UNIX format pathname will cause it to be converted to a pathname "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "suitable for the current host. This has no effect when the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "native system is UNIX.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[L]#?[n?Left justify. If \an\a is given it represents the field width. If "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the \b-Z\b attribute is also specified, then leading zeros are "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "stripped.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[R]#?[n?Right justify. If \an\a is given it represents the field width. If "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the \b-Z\b attribute is also specified, then zeros will "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "be used as the fill character. Otherwise, spaces are used.]"
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[X]#?[n:=2*sizeof(long long)?Floating point number represented in hexadecimal "
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "notation. \an\a specifies the number of significant figures when the "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "value is expanded.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#ifdef SHOPT_TYPEDEF
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[h]:[string?Used within a type definition to provide a help string "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "for variable \aname\a. Otherwise, it is ignored.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[S?Used with a type definition to indicate that the variable is shared by "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "each instance of the type. When used inside a function defined "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "with the \bfunction\b reserved word, the specified variables "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "will have function static scope. Otherwise, the variable is "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "unset prior to processing the assignment list.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[T]:[tname?\atname\a is the name of a type name given to each \aname\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[Z]#?[n?Zero fill. If \an\a is given it represents the field width.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[name[=value]...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin" -f [name...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?No errors occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\breadonly\b(1), \bexport\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optulimit[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?@(#)$Id: ulimit (AT&T Research) 2003-06-21 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?ulimit - set or display resource limits]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bulimit\b sets or displays resource limits. These "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "limits apply to the current process and to each child process "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "created after the resource limit has been set. If \alimit\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is specified, the resource limit is set, otherwise, its current value "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is displayed on standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Increasing the limit for a resource usually requires special privileges. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Some systems allow you to lower resource limits and later increase "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "them. These are called soft limits. Once a hard limit is "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "set the resource can not be increased.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Different systems allow you to specify different resources and some "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "restrict how much you can raise the limit of the resource.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?The value of \alimit\a depends on the unit of the resource listed "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "for each resource. In addition, \alimit\a can be \bunlimited\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to indicate no limit for that resource.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If you do not specify \b-H\b or \b-S\b, then \b-S\b is used for "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "listing and both \b-S\b and \b-H\b are used for setting resources.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If you do not specify any resource, the default is \b-f\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[H?A hard limit is set or displayed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[S?A soft limit is set or displayed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[a?Displays all current resource limits]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\flimits\f"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[limit]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?A request for a higher limit was rejected or an error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bulimit\b(2), \bgetrlimit\b(2)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optumask[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: umask (AT&T Research) 1999-04-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?umask - get or set the file creation mask]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bumask\b sets the file creation mask of the current "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "shell execution environment to the value specified by the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\amask\a operand. This mask affects the file permission bits "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of subsequently created files. \amask\a can either be an "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "octal number or a symbolic value as described in \bchmod\b(1). "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "If a symbolic value is given, the new file creation mask is the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "complement of the result of applying \amask\a to the complement "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of the current file creation mask.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \amask\a is not specified, \bumask\b writes the value of the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "file creation mask for the current process to standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[S?Causes the file creation mask to be written or treated as a symbolic value "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "rather than an octal number.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[mask]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?The file creation mask was successfully changed, or no "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\amask\a operand was supplied.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bchmod\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optuniverse[] = " [name]";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optunset[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: unset (AT&T Research) 1999-07-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?unset - unset values and attributes of variables and functions]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?For each \aname\a specified, \bunset\b unsets the variable, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "or function if \b-f\b is specified, from the current shell "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "execution environment. Readonly variables cannot be unset.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[n?If \aname\a refers to variable that is a reference, the variable \aname\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "will be unset rather than the variable it references. Otherwise, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is is equivalent to \b-v\b.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[f?\aname\a refers to a function name and the shell will unset the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "function definition.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[v?\aname\a refers to a variable name and the shell will unset it and "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "remove it from the environment. This is the default behavior.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\nname...\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?All \aname\as were successfully unset.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?One or more \aname\a operands could not be unset "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "or an error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\btypeset\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optunalias[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: unalias (AT&T Research) 1999-07-07 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?unalias - remove alias definitions]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bunalias\b removes the definition of each named alias "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "from the current shell execution environment, or all aliases if "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\b-a\b is specified. It will not affect any commands that "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "have already been read and subsequently executed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[a?Causes all alias definitions to be removed. \aname\a operands "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "are optional and ignored in this case.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\nname...\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Successful completion.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?\b-a\b was not specified and one or more \aname\a operands "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "did not have an alias definition, or an error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\balias\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optwait[] =
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[-1c?\n@(#)$Id: wait (AT&T Research) 1999-06-17 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?wait - wait for process or job completion]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bwait\b with no operands, waits until all jobs "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "known to the invoking shell have terminated. If one or more "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\ajob\a operands are specified, \bwait\b waits until all of them "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "have completed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?Each \ajob\a can be specified as one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+\anumber\a?\anumber\a refers to a process id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+-\anumber\a?\anumber\a refers to a process group id.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\anumber\a?\anumber\a refer to a job number.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%+ \bor\b %%?Refers to the current job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+%-?Refers to the previous job.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If one ore more \ajob\a operands is a process id or process group id "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "not known by the current shell environment, \bwait\b treats each "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "of them as if it were a process that exited with status 127.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[job ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?If \await\a is invoked with one or more \ajob\as, and all of "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "them have terminated or were not known by the invoking shell, "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the exit status of \bwait\b will be that of the last \ajob\a. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Otherwise, it will be one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?\bwait\b utility was invoked with no operands and all "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "processes known by the invoking process have terminated.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+127?\ajob\a is a process id or process group id that is unknown "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "to the current shell environment.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bjobs\b(1), \bps\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if SHOPT_FS_3D
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin const char sh_optvpath[] = " [top] [base]";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin const char sh_optvmap[] = " [dir] [list]";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* SHOPT_FS_3D */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char sh_optwhence[] =
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[-1c?\n@(#)$Id: whence (AT&T Research) 2007-04-24 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUSAGE_LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?whence - locate a command and describe its type]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?Without \b-v\b, \bwhence\b writes on standard output an "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "absolute pathname, if any, corresponding to \aname\a based "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "on the complete search order that the shell uses. If \aname\a "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "is not found, then no output is produced.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+?If \b-v\b is specified, the output will also contain information "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "that indicates how the given \aname\a would be interpreted by "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the shell in the current execution environment.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[a?Displays all uses for each \aname\a rather than the first.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[f?Do not check for functions.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[p?Do not check to see if \aname\a is a reserved word, a built-in, "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "an alias, or a function. This turns off the \b-v\b option.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[q?Quiet mode. Returns 0 if all arguments are built-ins, functions, or are "
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin "programs found on the path.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[v?For each name you specify, the shell displays a line that indicates "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "if that name is one of the following:]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+?Reserved word]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+?Alias]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+?Built-in]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+?Undefined function]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+?Function]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+?Tracked alias]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+?Program]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\nname ...\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?Each \aname\a was found by the shell.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+1?One or more \aname\as were not found by the shell.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>1?An error occurred.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\bcommand\b(1)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char e_alrm1[] = "alarm -r %s +%.3g\n";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char e_alrm2[] = "alarm %s %.3f\n";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char e_baddisc[] = "%s: invalid discipline function";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char e_nospace[] = "out of memory";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char e_nofork[] = "cannot fork";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char e_nosignal[] = "%s: unknown signal name";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char e_condition[] = "condition(s) required";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char e_cneedsarg[] = "-c requires argument";