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