{
    "mode": "info",
    "parameter": "sh",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/sh/json",
    "generated": "2026-08-02T15:33:49Z",
    "synopsis": "dash [-aCefnuvxIimqVEbp] [+aCefnuvxIimqVEbp] [-o optionname]\n[+o optionname] [commandfile [argument ...]]\ndash -c [-aCefnuvxIimqVEbp] [+aCefnuvxIimqVEbp] [-o optionname]\n[+o optionname] commandstring [commandname [argument ...]]\ndash -s [-aCefnuvxIimqVEbp] [+aCefnuvxIimqVEbp] [-o optionname]\n[+o optionname] [argument ...]",
    "sections": {
        "NAME": {
            "content": "dash -- command interpreter (shell)\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "dash [-aCefnuvxIimqVEbp] [+aCefnuvxIimqVEbp] [-o optionname]\n[+o optionname] [commandfile [argument ...]]\ndash -c [-aCefnuvxIimqVEbp] [+aCefnuvxIimqVEbp] [-o optionname]\n[+o optionname] commandstring [commandname [argument ...]]\ndash -s [-aCefnuvxIimqVEbp] [+aCefnuvxIimqVEbp] [-o optionname]\n[+o optionname] [argument ...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "dash is the standard command interpreter for the system.  The current\nversion of dash is in the process of being changed to conform with the\nPOSIX 1003.2 and 1003.2a specifications for the shell.  This version has\nmany features which make it appear similar in some respects to the Korn\nshell, but it is not a Korn shell clone (see ksh(1)).  Only features des-\nignated by POSIX, plus a few Berkeley extensions, are being incorporated\ninto this shell.  This man page is not intended to be a tutorial or a\ncomplete specification of the shell.\n\nOverview\nThe shell is a command that reads lines from either a file or the termi-\nnal, interprets them, and generally executes other commands.  It is the\nprogram that is running when a user logs into the system (although a user\ncan select a different shell with the chsh(1) command).  The shell imple-\nments a language that has flow control constructs, a macro facility that\nprovides a variety of features in addition to data storage, along with\nbuilt in history and line editing capabilities.  It incorporates many\nfeatures to aid interactive use and has the advantage that the interpre-\ntative language is common to both interactive and non-interactive use\n(shell scripts).  That is, commands can be typed directly to the running\nshell or can be put into a file and the file can be executed directly by\nthe shell.\n\nInvocation\nIf no args are present and if the standard input of the shell is con-\nnected to a terminal (or if the -i flag is set), and the -c option is not\npresent, the shell is considered an interactive shell.  An interactive\nshell generally prompts before each command and handles programming and\ncommand errors differently (as described below).  When first starting,\nthe shell inspects argument 0, and if it begins with a dash '-', the\nshell is also considered a login shell.  This is normally done automati-\ncally by the system when the user first logs in.  A login shell first\nreads commands from the files /etc/profile and .profile if they exist.\nIf the environment variable ENV is set on entry to an interactive shell,\nor is set in the .profile of a login shell, the shell next reads commands\nfrom the file named in ENV.  Therefore, a user should place commands that\nare to be executed only at login time in the .profile file, and commands\nthat are executed for every interactive shell inside the ENV file.  To\nset the ENV variable to some file, place the following line in your\n.profile of your home directory\n\nENV=$HOME/.shinit; export ENV\n\nsubstituting for \".shinit\" any filename you wish.\n\nIf command line arguments besides the options have been specified, then\nthe shell treats the first argument as the name of a file from which to\nread commands (a shell script), and the remaining arguments are set as\nthe positional parameters of the shell ($1, $2, etc).  Otherwise, the\nshell reads commands from its standard input.\n\nArgument List Processing\nAll of the single letter options that have a corresponding name can be\nused as an argument to the -o option.  The set -o name is provided next\nto the single letter option in the description below.  Specifying a dash\n\"-\" turns the option on, while using a plus \"+\" disables the option.  The\nfollowing options can be set from the command line or with the set\nbuiltin (described later).\n\n-a allexport     Export all variables assigned to.\n\n-c               Read commands from the commandstring operand in-\nstead of from the standard input.  Special parame-\nter 0 will be set from the commandname operand\nand the positional parameters ($1, $2, etc.)  set\nfrom the remaining argument operands.\n\n-C noclobber     Don't overwrite existing files with \">\".\n\n-e errexit       If not interactive, exit immediately if any\nuntested command fails.  The exit status of a com-\nmand is considered to be explicitly tested if the\ncommand is used to control an if, elif, while, or\nuntil; or if the command is the left hand operand\nof an \"&&\" or \"||\" operator.\n\n-f noglob        Disable pathname expansion.\n\n-n noexec        If not interactive, read commands but do not exe-\ncute them.  This is useful for checking the syntax\nof shell scripts.\n\n-u nounset       Write a message to standard error when attempting\nto expand a variable that is not set, and if the\nshell is not interactive, exit immediately.\n\n-v verbose       The shell writes its input to standard error as it\nis read.  Useful for debugging.\n\n-x xtrace        Write each command to standard error (preceded by\na '+ ') before it is executed.  Useful for debug-\nging.\n\n-I ignoreeof     Ignore EOF's from input when interactive.\n\n-i interactive   Force the shell to behave interactively.\n\n-l               Make dash act as if it had been invoked as a login\nshell.\n\n-m monitor       Turn on job control (set automatically when inter-\nactive).\n\n-s stdin         Read commands from standard input (set automati-\ncally if no file arguments are present).  This op-\ntion has no effect when set after the shell has\nalready started running (i.e. with set).\n\n-V vi            Enable the built-in vi(1) command line editor\n(disables -E if it has been set).\n\n-E emacs         Enable the built-in emacs(1) command line editor\n(disables -V if it has been set).\n\n-b notify        Enable asynchronous notification of background job\ncompletion.  (UNIMPLEMENTED for 4.4alpha)\n\n-p priviliged    Do not attempt to reset effective uid if it does\nnot match uid. This is not set by default to help\navoid incorrect usage by setuid root programs via\nsystem(3) or popen(3).\n\nLexical Structure\nThe shell reads input in terms of lines from a file and breaks it up into\nwords at whitespace (blanks and tabs), and at certain sequences of char-\nacters that are special to the shell called \"operators\".  There are two\ntypes of operators: control operators and redirection operators (their\nmeaning is discussed later).  Following is a list of operators:\n\nControl operators:\n& && ( ) ; ;; | || <newline>\n\nRedirection operators:\n< > >| << >> <& >& <<- <>\n\nQuoting\nQuoting is used to remove the special meaning of certain characters or\nwords to the shell, such as operators, whitespace, or keywords.  There\nare three types of quoting: matched single quotes, matched double quotes,\nand backslash.\n\nBackslash\nA backslash preserves the literal meaning of the following character,\nwith the exception of <newline>.  A backslash preceding a <newline> is\ntreated as a line continuation.\n\nSingle Quotes\nEnclosing characters in single quotes preserves the literal meaning of\nall the characters (except single quotes, making it impossible to put\nsingle-quotes in a single-quoted string).\n\nDouble Quotes\nEnclosing characters within double quotes preserves the literal meaning\nof all characters except dollarsign ($), backquote (`), and backslash\n(\\).  The backslash inside double quotes is historically weird, and\nserves to quote only the following characters:\n$ ` \" \\ <newline>.\nOtherwise it remains literal.\n\nReserved Words\nReserved words are words that have special meaning to the shell and are\nrecognized at the beginning of a line and after a control operator.  The\nfollowing are reserved words:\n\n!       elif    fi      while   case\nelse    for     then    {       }\ndo      done    until   if      esac\n\nTheir meaning is discussed later.\n\nAliases\nAn alias is a name and corresponding value set using the alias(1) builtin\ncommand.  Whenever a reserved word may occur (see above), and after\nchecking for reserved words, the shell checks the word to see if it\nmatches an alias.  If it does, it replaces it in the input stream with\nits value.  For example, if there is an alias called \"lf\" with the value\n\"ls -F\", then the input:\n\nlf foobar <return>\n\nwould become\n\nls -F foobar <return>\n\nAliases provide a convenient way for naive users to create shorthands for\ncommands without having to learn how to create functions with arguments.\nThey can also be used to create lexically obscure code.  This use is dis-\ncouraged.\n\nCommands\nThe shell interprets the words it reads according to a language, the\nspecification of which is outside the scope of this man page (refer to\nthe BNF in the POSIX 1003.2 document).  Essentially though, a line is\nread and if the first word of the line (or after a control operator) is\nnot a reserved word, then the shell has recognized a simple command.\nOtherwise, a complex command or some other special construct may have\nbeen recognized.\n\nSimple Commands\nIf a simple command has been recognized, the shell performs the following\nactions:\n\n1.   Leading words of the form \"name=value\" are stripped off and\nassigned to the environment of the simple command.  Redirect-\nion operators and their arguments (as described below) are\nstripped off and saved for processing.\n\n2.   The remaining words are expanded as described in the section\ncalled \"Expansions\", and the first remaining word is consid-\nered the command name and the command is located.  The remain-\ning words are considered the arguments of the command.  If no\ncommand name resulted, then the \"name=value\" variable assign-\nments recognized in item 1 affect the current shell.\n\n3.   Redirections are performed as described in the next section.\n\nRedirections\nRedirections are used to change where a command reads its input or sends\nits output.  In general, redirections open, close, or duplicate an exist-\ning reference to a file.  The overall format used for redirection is:\n\n[n] redir-op file\n\nwhere redir-op is one of the redirection operators mentioned previously.\nFollowing is a list of the possible redirections.  The [n] is an optional\nnumber between 0 and 9, as in '3' (not '[3]'), that refers to a file de-\nscriptor.\n\n[n]> file   Redirect standard output (or n) to file.\n\n[n]>| file  Same, but override the -C option.\n\n[n]>> file  Append standard output (or n) to file.\n\n[n]< file   Redirect standard input (or n) from file.\n\n[n1]<&n2    Copy file descriptor n2 as stdout (or fd n1).  fd n2.\n\n[n]<&-      Close standard input (or n).\n\n[n1]>&n2    Copy file descriptor n2 as stdin (or fd n1).  fd n2.\n\n[n]>&-      Close standard output (or n).\n\n[n]<> file  Open file for reading and writing on standard input (or\nn).\n\nThe following redirection is often called a \"here-document\".\n\n[n]<< delimiter\nhere-doc-text ...\ndelimiter\n\nAll the text on successive lines up to the delimiter is saved away and\nmade available to the command on standard input, or file descriptor n if\nit is specified.  If the delimiter as specified on the initial line is\nquoted, then the here-doc-text is treated literally, otherwise the text\nis subjected to parameter expansion, command substitution, and arithmetic\nexpansion (as described in the section on \"Expansions\").  If the operator\nis \"<<-\" instead of \"<<\", then leading tabs in the here-doc-text are\nstripped.\n\nSearch and Execution\nThere are three types of commands: shell functions, builtin commands, and\nnormal programs - and the command is searched for (by name) in that or-\nder.  They each are executed in a different way.\n\nWhen a shell function is executed, all of the shell positional parameters\n(except $0, which remains unchanged) are set to the arguments of the\nshell function.  The variables which are explicitly placed in the envi-\nronment of the command (by placing assignments to them before the func-\ntion name) are made local to the function and are set to the values\ngiven.  Then the command given in the function definition is executed.\nThe positional parameters are restored to their original values when the\ncommand completes.  This all occurs within the current shell.\n\nShell builtins are executed internally to the shell, without spawning a\nnew process.\n\nOtherwise, if the command name doesn't match a function or builtin, the\ncommand is searched for as a normal program in the file system (as de-\nscribed in the next section).  When a normal program is executed, the\nshell runs the program, passing the arguments and the environment to the\nprogram.  If the program is not a normal executable file (i.e., if it\ndoes not begin with the \"magic number\" whose ASCII representation is\n\"#!\", so execve(2) returns ENOEXEC then) the shell will interpret the\nprogram in a subshell.  The child shell will reinitialize itself in this\ncase, so that the effect will be as if a new shell had been invoked to\nhandle the ad-hoc shell script, except that the location of hashed com-\nmands located in the parent shell will be remembered by the child.\n\nNote that previous versions of this document and the source code itself\nmisleadingly and sporadically refer to a shell script without a magic\nnumber as a \"shell procedure\".\n\nPath Search\nWhen locating a command, the shell first looks to see if it has a shell\nfunction by that name.  Then it looks for a builtin command by that name.\nIf a builtin command is not found, one of two things happen:\n\n1.   Command names containing a slash are simply executed without per-\nforming any searches.\n\n2.   The shell searches each entry in PATH in turn for the command.  The\nvalue of the PATH variable should be a series of entries separated\nby colons.  Each entry consists of a directory name.  The current\ndirectory may be indicated implicitly by an empty directory name, or\nexplicitly by a single period.\n\nCommand Exit Status\nEach command has an exit status that can influence the behaviour of other\nshell commands.  The paradigm is that a command exits with zero for nor-\nmal or success, and non-zero for failure, error, or a false indication.\nThe man page for each command should indicate the various exit codes and\nwhat they mean.  Additionally, the builtin commands return exit codes, as\ndoes an executed shell function.\n\nIf a command consists entirely of variable assignments then the exit sta-\ntus of the command is that of the last command substitution if any, oth-\nerwise 0.\n\nComplex Commands\nComplex commands are combinations of simple commands with control opera-\ntors or reserved words, together creating a larger complex command.  More\ngenerally, a command is one of the following:\n\no   simple command\n\no   pipeline\n\no   list or compound-list\n\no   compound command\n\no   function definition\n\nUnless otherwise stated, the exit status of a command is that of the last\nsimple command executed by the command.\n\nPipelines\nA pipeline is a sequence of one or more commands separated by the control\noperator |.  The standard output of all but the last command is connected\nto the standard input of the next command.  The standard output of the\nlast command is inherited from the shell, as usual.\n\nThe format for a pipeline is:\n\n[!] command1 [| command2 ...]\n\nThe standard output of command1 is connected to the standard input of\ncommand2.  The standard input, standard output, or both of a command is\nconsidered to be assigned by the pipeline before any redirection speci-\nfied by redirection operators that are part of the command.\n\nIf the pipeline is not in the background (discussed later), the shell\nwaits for all commands to complete.\n\nIf the reserved word ! does not precede the pipeline, the exit status is\nthe exit status of the last command specified in the pipeline.  Other-\nwise, the exit status is the logical NOT of the exit status of the last\ncommand.  That is, if the last command returns zero, the exit status is\n1; if the last command returns greater than zero, the exit status is\nzero.\n\nBecause pipeline assignment of standard input or standard output or both\ntakes place before redirection, it can be modified by redirection.  For\nexample:\n\n$ command1 2>&1 | command2\n\nsends both the standard output and standard error of command1 to the\nstandard input of command2.\n\nA ; or <newline> terminator causes the preceding AND-OR-list (described\nnext) to be executed sequentially; a & causes asynchronous execution of\nthe preceding AND-OR-list.\n\nNote that unlike some other shells, each process in the pipeline is a\nchild of the invoking shell (unless it is a shell builtin, in which case\nit executes in the current shell - but any effect it has on the environ-\nment is wiped).\n\nBackground Commands - &\nIf a command is terminated by the control operator ampersand (&), the\nshell executes the command asynchronously - that is, the shell does not\nwait for the command to finish before executing the next command.\n\nThe format for running a command in background is:\n\ncommand1 & [command2 & ...]\n\nIf the shell is not interactive, the standard input of an asynchronous\ncommand is set to /dev/null.\n\nLists - Generally Speaking\nA list is a sequence of zero or more commands separated by newlines,\nsemicolons, or ampersands, and optionally terminated by one of these\nthree characters.  The commands in a list are executed in the order they\nare written.  If command is followed by an ampersand, the shell starts\nthe command and immediately proceeds onto the next command; otherwise it\nwaits for the command to terminate before proceeding to the next one.\n\nShort-Circuit List Operators\n\"&&\" and \"||\" are AND-OR list operators.  \"&&\" executes the first com-\nmand, and then executes the second command if and only if the exit status\nof the first command is zero.  \"||\" is similar, but executes the second\ncommand if and only if the exit status of the first command is nonzero.\n\"&&\" and \"||\" both have the same priority.\n\nFlow-Control Constructs - if, while, for, case\nThe syntax of the if command is\n\nif list\nthen list\n[ elif list\nthen    list ] ...\n[ else list ]\nfi\n\nThe syntax of the while command is\n\nwhile list\ndo   list\ndone\n\nThe two lists are executed repeatedly while the exit status of the first\nlist is zero.  The until command is similar, but has the word until in\nplace of while, which causes it to repeat until the exit status of the\nfirst list is zero.\n\nThe syntax of the for command is\n\nfor variable [ in [ word ... ] ]\ndo   list\ndone\n\nThe words following in are expanded, and then the list is executed re-\npeatedly with the variable set to each word in turn.  Omitting in word\n... is equivalent to in \"$@\".\n\nThe syntax of the break and continue command is\n\nbreak [ num ]\ncontinue [ num ]\n\nBreak terminates the num innermost for or while loops.  Continue contin-\nues with the next iteration of the innermost loop.  These are implemented\nas builtin commands.\n\nThe syntax of the case command is\n\ncase word in\n[(]pattern) list ;;\n...\nesac\n\nThe pattern can actually be one or more patterns (see Shell Patterns de-\nscribed later), separated by \"|\" characters.  The \"(\" character before\nthe pattern is optional.\n\nGrouping Commands Together\nCommands may be grouped by writing either\n\n(list)\n\nor\n\n{ list; }\n\nThe first of these executes the commands in a subshell.  Builtin commands\ngrouped into a (list) will not affect the current shell.  The second form\ndoes not fork another shell so is slightly more efficient.  Grouping com-\nmands together this way allows you to redirect their output as though\nthey were one program:\n\n{ printf \" hello \" ; printf \" world\\n\" ; } > greeting\n\nNote that \"}\" must follow a control operator (here, \";\") so that it is\nrecognized as a reserved word and not as another command argument.\n\nFunctions\nThe syntax of a function definition is\n\nname () command\n\nA function definition is an executable statement; when executed it in-\nstalls a function named name and returns an exit status of zero.  The\ncommand is normally a list enclosed between \"{\" and \"}\".\n\nVariables may be declared to be local to a function by using a local com-\nmand.  This should appear as the first statement of a function, and the\nsyntax is\n\nlocal [variable | -] ...\n\nLocal is implemented as a builtin command.\n\nWhen a variable is made local, it inherits the initial value and exported\nand readonly flags from the variable with the same name in the surround-\ning scope, if there is one.  Otherwise, the variable is initially unset.\nThe shell uses dynamic scoping, so that if you make the variable x local\nto function f, which then calls function g, references to the variable x\nmade inside g will refer to the variable x declared inside f, not to the\nglobal variable named x.\n\nThe only special parameter that can be made local is \"-\".  Making \"-\" lo-\ncal any shell options that are changed via the set command inside the\nfunction to be restored to their original values when the function re-\nturns.\n\nThe syntax of the return command is\n\nreturn [exitstatus]\n\nIt terminates the currently executing function.  Return is implemented as\na builtin command.\n\nVariables and Parameters\nThe shell maintains a set of parameters.  A parameter denoted by a name\nis called a variable.  When starting up, the shell turns all the environ-\nment variables into shell variables.  New variables can be set using the\nform\n\nname=value\n\nVariables set by the user must have a name consisting solely of alphabet-\nics, numerics, and underscores - the first of which must not be numeric.\nA parameter can also be denoted by a number or a special character as ex-\nplained below.\n\nPositional Parameters\nA positional parameter is a parameter denoted by a number (n > 0).  The\nshell sets these initially to the values of its command line arguments\nthat follow the name of the shell script.  The set builtin can also be\nused to set or reset them.\n\nSpecial Parameters\nA special parameter is a parameter denoted by one of the following spe-\ncial characters.  The value of the parameter is listed next to its char-\nacter.\n\n*            Expands to the positional parameters, starting from one.\nWhen the expansion occurs within a double-quoted string it\nexpands to a single field with the value of each parameter\nseparated by the first character of the IFS variable, or by\na <space> if IFS is unset.\n\n@            Expands to the positional parameters, starting from one.\nWhen the expansion occurs within double-quotes, each posi-\ntional parameter expands as a separate argument.  If there\nare no positional parameters, the expansion of @ generates\nzero arguments, even when @ is double-quoted.  What this ba-\nsically means, for example, is if $1 is \"abc\" and $2 is \"def\nghi\", then \"$@\" expands to the two arguments:\n\n\"abc\" \"def ghi\"\n\n#            Expands to the number of positional parameters.\n\n?            Expands to the exit status of the most recent pipeline.\n\n- (Hyphen.)  Expands to the current option flags (the single-letter op-\ntion names concatenated into a string) as specified on invo-\ncation, by the set builtin command, or implicitly by the\nshell.\n\n$            Expands to the process ID of the invoked shell.  A subshell\nretains the same value of $ as its parent.\n\n!            Expands to the process ID of the most recent background com-\nmand executed from the current shell.  For a pipeline, the\nprocess ID is that of the last command in the pipeline.\n\n0 (Zero.)    Expands to the name of the shell or shell script.\n\nWord Expansions\nThis clause describes the various expansions that are performed on words.\nNot all expansions are performed on every word, as explained later.\n\nTilde expansions, parameter expansions, command substitutions, arithmetic\nexpansions, and quote removals that occur within a single word expand to\na single field.  It is only field splitting or pathname expansion that\ncan create multiple fields from a single word.  The single exception to\nthis rule is the expansion of the special parameter @ within double-\nquotes, as was described above.\n\nThe order of word expansion is:\n\n1.   Tilde Expansion, Parameter Expansion, Command Substitution, Arith-\nmetic Expansion (these all occur at the same time).\n\n2.   Field Splitting is performed on fields generated by step (1) unless\nthe IFS variable is null.\n\n3.   Pathname Expansion (unless set -f is in effect).\n\n4.   Quote Removal.\n\nThe $ character is used to introduce parameter expansion, command substi-\ntution, or arithmetic evaluation.\n\nTilde Expansion (substituting a user's home directory)\nA word beginning with an unquoted tilde character (~) is subjected to\ntilde expansion.  All the characters up to a slash (/) or the end of the\nword are treated as a username and are replaced with the user's home di-\nrectory.  If the username is missing (as in ~/foobar), the tilde is re-\nplaced with the value of the HOME variable (the current user's home di-\nrectory).\n\nParameter Expansion\nThe format for parameter expansion is as follows:\n\n${expression}\n\nwhere expression consists of all characters until the matching \"}\".  Any\n\"}\" escaped by a backslash or within a quoted string, and characters in\nembedded arithmetic expansions, command substitutions, and variable ex-\npansions, are not examined in determining the matching \"}\".\n\nThe simplest form for parameter expansion is:\n\n${parameter}\n\nThe value, if any, of parameter is substituted.\n\nThe parameter name or symbol can be enclosed in braces, which are op-\ntional except for positional parameters with more than one digit or when\nparameter is followed by a character that could be interpreted as part of\nthe name.  If a parameter expansion occurs inside double-quotes:\n\n1.   Pathname expansion is not performed on the results of the expansion.\n\n2.   Field splitting is not performed on the results of the expansion,\nwith the exception of @.\n\nIn addition, a parameter expansion can be modified by using one of the\nfollowing formats.\n\n${parameter:-word}    Use Default Values.  If parameter is unset or null,\nthe expansion of word is substituted; otherwise,\nthe value of parameter is substituted.\n\n${parameter:=word}    Assign Default Values.  If parameter is unset or\nnull, the expansion of word is assigned to parame-\nter.  In all cases, the final value of parameter is\nsubstituted.  Only variables, not positional param-\neters or special parameters, can be assigned in\nthis way.\n\n${parameter:?[word]}  Indicate Error if Null or Unset.  If parameter is\nunset or null, the expansion of word (or a message\nindicating it is unset if word is omitted) is writ-\nten to standard error and the shell exits with a\nnonzero exit status.  Otherwise, the value of pa-\nrameter is substituted.  An interactive shell need\nnot exit.\n\n${parameter:+word}    Use Alternative Value.  If parameter is unset or\nnull, null is substituted; otherwise, the expansion\nof word is substituted.\n\nIn the parameter expansions shown previously, use of the colon in the\nformat results in a test for a parameter that is unset or null; omission\nof the colon results in a test for a parameter that is only unset.\n\n${#parameter}         String Length.  The length in characters of the\nvalue of parameter.\n\nThe following four varieties of parameter expansion provide for substring\nprocessing.  In each case, pattern matching notation (see Shell\nPatterns), rather than regular expression notation, is used to evaluate\nthe patterns.  If parameter is * or @, the result of the expansion is un-\nspecified.  Enclosing the full parameter expansion string in double-\nquotes does not cause the following four varieties of pattern characters\nto be quoted, whereas quoting characters within the braces has this ef-\nfect.\n\n${parameter%word}     Remove Smallest Suffix Pattern.  The word is ex-\npanded to produce a pattern.  The parameter expan-\nsion then results in parameter, with the smallest\nportion of the suffix matched by the pattern\ndeleted.\n\n${parameter%%word}    Remove Largest Suffix Pattern.  The word is ex-\npanded to produce a pattern.  The parameter expan-\nsion then results in parameter, with the largest\nportion of the suffix matched by the pattern\ndeleted.\n\n${parameter#word}     Remove Smallest Prefix Pattern.  The word is ex-\npanded to produce a pattern.  The parameter expan-\nsion then results in parameter, with the smallest\nportion of the prefix matched by the pattern\ndeleted.\n\n${parameter##word}    Remove Largest Prefix Pattern.  The word is ex-\npanded to produce a pattern.  The parameter expan-\nsion then results in parameter, with the largest\nportion of the prefix matched by the pattern\ndeleted.\n\nCommand Substitution\nCommand substitution allows the output of a command to be substituted in\nplace of the command name itself.  Command substitution occurs when the\ncommand is enclosed as follows:\n\n$(command)\n\nor (\"backquoted\" version):\n\n`command`\n\nThe shell expands the command substitution by executing command in a sub-\nshell environment and replacing the command substitution with the stan-\ndard output of the command, removing sequences of one or more <newline>s\nat the end of the substitution.  (Embedded <newline>s before the end of\nthe output are not removed; however, during field splitting, they may be\ntranslated into <space>s, depending on the value of IFS and quoting that\nis in effect.)\n\nArithmetic Expansion\nArithmetic expansion provides a mechanism for evaluating an arithmetic\nexpression and substituting its value.  The format for arithmetic expan-\nsion is as follows:\n\n$((expression))\n\nThe expression is treated as if it were in double-quotes, except that a\ndouble-quote inside the expression is not treated specially.  The shell\nexpands all tokens in the expression for parameter expansion, command\nsubstitution, and quote removal.\n\nNext, the shell treats this as an arithmetic expression and substitutes\nthe value of the expression.\n\nWhite Space Splitting (Field Splitting)\nAfter parameter expansion, command substitution, and arithmetic expansion\nthe shell scans the results of expansions and substitutions that did not\noccur in double-quotes for field splitting and multiple fields can re-\nsult.\n\nThe shell treats each character of the IFS as a delimiter and uses the\ndelimiters to split the results of parameter expansion and command sub-\nstitution into fields.\n\nPathname Expansion (File Name Generation)\nUnless the -f flag is set, file name generation is performed after word\nsplitting is complete.  Each word is viewed as a series of patterns, sep-\narated by slashes.  The process of expansion replaces the word with the\nnames of all existing files whose names can be formed by replacing each\npattern with a string that matches the specified pattern.  There are two\nrestrictions on this: first, a pattern cannot match a string containing a\nslash, and second, a pattern cannot match a string starting with a period\nunless the first character of the pattern is a period.  The next section\ndescribes the patterns used for both Pathname Expansion and the case com-\nmand.\n\nShell Patterns\nA pattern consists of normal characters, which match themselves, and\nmeta-characters.  The meta-characters are \"!\", \"*\", \"?\", and \"[\".  These\ncharacters lose their special meanings if they are quoted.  When command\nor variable substitution is performed and the dollar sign or back quotes\nare not double quoted, the value of the variable or the output of the\ncommand is scanned for these characters and they are turned into meta-\ncharacters.\n\nAn asterisk (\"*\") matches any string of characters.  A question mark\nmatches any single character.  A left bracket (\"[\") introduces a charac-\nter class.  The end of the character class is indicated by a (\"]\"); if\nthe \"]\" is missing then the \"[\" matches a \"[\" rather than introducing a\ncharacter class.  A character class matches any of the characters between\nthe square brackets.  A range of characters may be specified using a mi-\nnus sign.  The character class may be complemented by making an exclama-\ntion point the first character of the character class.\n\nTo include a \"]\" in a character class, make it the first character listed\n(after the \"!\", if any).  To include a minus sign, make it the first or\nlast character listed.\n\nBuiltins\nThis section lists the builtin commands which are builtin because they\nneed to perform some operation that can't be performed by a separate\nprocess.  In addition to these, there are several other commands that may\nbe builtin for efficiency (e.g.  printf(1), echo(1), test(1), etc).\n\n:\n\ntrue   A null command that returns a 0 (true) exit value.\n\n. file\nThe commands in the specified file are read and executed by the\nshell.\n\nalias [name[=string ...]]\nIf name=string is specified, the shell defines the alias name with\nvalue string.  If just name is specified, the value of the alias\nname is printed.  With no arguments, the alias builtin prints the\nnames and values of all defined aliases (see unalias).\n\nbg [job] ...\nContinue the specified jobs (or the current job if no jobs are\ngiven) in the background.\n\ncommand [-p] [-v] [-V] command [arg ...]\nExecute the specified command but ignore shell functions when\nsearching for it.  (This is useful when you have a shell function\nwith the same name as a builtin command.)\n\n-p     search for command using a PATH that guarantees to find all\nthe standard utilities.\n\n-V     Do not execute the command but search for the command and\nprint the resolution of the command search.  This is the\nsame as the type builtin.\n\n-v     Do not execute the command but search for the command and\nprint the absolute pathname of utilities, the name for\nbuiltins or the expansion of aliases.\n\ncd -\n\ncd [-LP] [directory]\nSwitch to the specified directory (default HOME).  If an entry for\nCDPATH appears in the environment of the cd command or the shell\nvariable CDPATH is set and the directory name does not begin with\na slash, then the directories listed in CDPATH will be searched\nfor the specified directory.  The format of CDPATH is the same as\nthat of PATH.  If a single dash is specified as the argument, it\nwill be replaced by the value of OLDPWD.  The cd command will\nprint out the name of the directory that it actually switched to\nif this is different from the name that the user gave.  These may\nbe different either because the CDPATH mechanism was used or be-\ncause the argument is a single dash.  The -P option causes the\nphysical directory structure to be used, that is, all symbolic\nlinks are resolved to their respective values.  The -L option\nturns off the effect of any preceding -P options.\n\necho [-n] args...\nPrint the arguments on the standard output, separated by spaces.\nUnless the -n option is present, a newline is output following the\narguments.\n\nIf any of the following sequences of characters is encountered\nduring output, the sequence is not output.  Instead, the specified\naction is performed:\n\n\\b      A backspace character is output.\n\n\\c      Subsequent output is suppressed.  This is normally used at\nthe end of the last argument to suppress the trailing new-\nline that echo would otherwise output.\n\n\\e      Outputs an escape character (ESC).\n\n\\f      Output a form feed.\n\n\\n      Output a newline character.\n\n\\r      Output a carriage return.\n\n\\t      Output a (horizontal) tab character.\n\n\\v      Output a vertical tab.\n\n\\0digits\nOutput the character whose value is given by zero to three\noctal digits.  If there are zero digits, a nul character\nis output.\n\n\\\\      Output a backslash.\n\nAll other backslash sequences elicit undefined behaviour.\n\neval string ...\nConcatenate all the arguments with spaces.  Then re-parse and exe-\ncute the command.\n\nexec [command arg ...]\nUnless command is omitted, the shell process is replaced with the\nspecified program (which must be a real program, not a shell\nbuiltin or function).  Any redirections on the exec command are\nmarked as permanent, so that they are not undone when the exec\ncommand finishes.\n\nexit [exitstatus]\nTerminate the shell process.  If exitstatus is given it is used as\nthe exit status of the shell; otherwise the exit status of the\npreceding command is used.\n\nexport name ...\n\nexport -p\nThe specified names are exported so that they will appear in the\nenvironment of subsequent commands.  The only way to un-export a\nvariable is to unset it.  The shell allows the value of a variable\nto be set at the same time it is exported by writing\n\nexport name=value\n\nWith no arguments the export command lists the names of all ex-\nported variables.  With the -p option specified the output will be\nformatted suitably for non-interactive use.\n\nfc [-e editor] [first [last]]\n\nfc -l [-nr] [first [last]]\n\nfc -s [old=new] [first]\nThe fc builtin lists, or edits and re-executes, commands previ-\nously entered to an interactive shell.\n\n-e editor\nUse the editor named by editor to edit the commands.  The\neditor string is a command name, subject to search via the\nPATH variable.  The value in the FCEDIT variable is used as\na default when -e is not specified.  If FCEDIT is null or\nunset, the value of the EDITOR variable is used.  If EDITOR\nis null or unset, ed(1) is used as the editor.\n\n-l (ell)\nList the commands rather than invoking an editor on them.\nThe commands are written in the sequence indicated by the\nfirst and last operands, as affected by -r, with each com-\nmand preceded by the command number.\n\n-n     Suppress command numbers when listing with -l.\n\n-r     Reverse the order of the commands listed (with -l) or\nedited (with neither -l nor -s).\n\n-s     Re-execute the command without invoking an editor.\n\nfirst\n\nlast   Select the commands to list or edit.  The number of previ-\nous commands that can be accessed are determined by the\nvalue of the HISTSIZE variable.  The value of first or last\nor both are one of the following:\n\n[+]number\nA positive number representing a command number;\ncommand numbers can be displayed with the -l option.\n\n-number\nA negative decimal number representing the command\nthat was executed number of commands previously.\nFor example, -1 is the immediately previous command.\n\nstring\nA string indicating the most recently entered command that\nbegins with that string.  If the old=new operand is not\nalso specified with -s, the string form of the first oper-\nand cannot contain an embedded equal sign.\n\nThe following environment variables affect the execution of fc:\n\nFCEDIT    Name of the editor to use.\n\nHISTSIZE  The number of previous commands that are accessible.\n\nfg [job]\nMove the specified job or the current job to the foreground.\n\ngetopts optstring var\nThe POSIX getopts command, not to be confused with the Bell Labs\n-derived getopt(1).\n\nThe first argument should be a series of letters, each of which\nmay be optionally followed by a colon to indicate that the option\nrequires an argument.  The variable specified is set to the parsed\noption.\n\nThe getopts command deprecates the older getopt(1) utility due to\nits handling of arguments containing whitespace.\n\nThe getopts builtin may be used to obtain options and their argu-\nments from a list of parameters.  When invoked, getopts places the\nvalue of the next option from the option string in the list in the\nshell variable specified by var and its index in the shell vari-\nable OPTIND.  When the shell is invoked, OPTIND is initialized to\n1.  For each option that requires an argument, the getopts builtin\nwill place it in the shell variable OPTARG.  If an option is not\nallowed for in the optstring, then OPTARG will be unset.\n\noptstring is a string of recognized option letters (see\ngetopt(3)).  If a letter is followed by a colon, the option is ex-\npected to have an argument which may or may not be separated from\nit by white space.  If an option character is not found where ex-\npected, getopts will set the variable var to a \"?\"; getopts will\nthen unset OPTARG and write output to standard error.  By specify-\ning a colon as the first character of optstring all errors will be\nignored.\n\nAfter the last option getopts will return a non-zero value and set\nvar to \"?\".\n\nThe following code fragment shows how one might process the argu-\nments for a command that can take the options [a] and [b], and the\noption [c], which requires an argument.\n\nwhile getopts abc: f\ndo\ncase $f in\na | b)  flag=$f;;\nc)      carg=$OPTARG;;\n\\?)     echo $USAGE; exit 1;;\nesac\ndone\nshift `expr $OPTIND - 1`\n\nThis code will accept any of the following as equivalent:\n\ncmd -acarg file file\ncmd -a -c arg file file\ncmd -carg -a file file\ncmd -a -carg -- file file\n\nhash -rv command ...\nThe shell maintains a hash table which remembers the locations of\ncommands.  With no arguments whatsoever, the hash command prints\nout the contents of this table.  Entries which have not been\nlooked at since the last cd command are marked with an asterisk;\nit is possible for these entries to be invalid.\n\nWith arguments, the hash command removes the specified commands\nfrom the hash table (unless they are functions) and then locates\nthem.  With the -v option, hash prints the locations of the com-\nmands as it finds them.  The -r option causes the hash command to\ndelete all the entries in the hash table except for functions.\n\npwd [-LP]\nbuiltin command remembers what the current directory is rather\nthan recomputing it each time.  This makes it faster.  However, if\nthe current directory is renamed, the builtin version of pwd will\ncontinue to print the old name for the directory.  The -P option\ncauses the physical value of the current working directory to be\nshown, that is, all symbolic links are resolved to their respec-\ntive values.  The -L option turns off the effect of any preceding\n-P options.\n\nread [-p prompt] [-r] variable [...]\nThe prompt is printed if the -p option is specified and the stan-\ndard input is a terminal.  Then a line is read from the standard\ninput.  The trailing newline is deleted from the line and the line\nis split as described in the section on word splitting above, and\nthe pieces are assigned to the variables in order.  At least one\nvariable must be specified.  If there are more pieces than vari-\nables, the remaining pieces (along with the characters in IFS that\nseparated them) are assigned to the last variable.  If there are\nmore variables than pieces, the remaining variables are assigned\nthe null string.  The read builtin will indicate success unless\nEOF is encountered on input, in which case failure is returned.\n\nBy default, unless the -r option is specified, the backslash \"\\\"\nacts as an escape character, causing the following character to be\ntreated literally.  If a backslash is followed by a newline, the\nbackslash and the newline will be deleted.\n\nreadonly name ...\n\nreadonly -p\nThe specified names are marked as read only, so that they cannot\nbe subsequently modified or unset.  The shell allows the value of\na variable to be set at the same time it is marked read only by\nwriting\n\nreadonly name=value\n\nWith no arguments the readonly command lists the names of all read\nonly variables.  With the -p option specified the output will be\nformatted suitably for non-interactive use.\n\nprintf format [arguments ...]\nprintf formats and prints its arguments, after the first, under\ncontrol of the format.  The format is a character string which\ncontains three types of objects: plain characters, which are sim-\nply copied to standard output, character escape sequences which\nare converted and copied to the standard output, and format speci-\nfications, each of which causes printing of the next successive\nargument.\n\nThe arguments after the first are treated as strings if the corre-\nsponding format is either b, c or s; otherwise it is evaluated as\na C constant, with the following extensions:\n\no   A leading plus or minus sign is allowed.\no   If the leading character is a single or double quote,\nthe value is the ASCII code of the next character.\n\nThe format string is reused as often as necessary to satisfy the\narguments.  Any extra format specifications are evaluated with\nzero or the null string.\n\nCharacter escape sequences are in backslash notation as defined in\nANSI X3.159-1989 (\"ANSI C89\").  The characters and their meanings\nare as follows:\n\n\\a      Write a <bell> character.\n\n\\b      Write a <backspace> character.\n\n\\e      Write an <escape> (ESC) character.\n\n\\f      Write a <form-feed> character.\n\n\\n      Write a <new-line> character.\n\n\\r      Write a <carriage return> character.\n\n\\t      Write a <tab> character.\n\n\\v      Write a <vertical tab> character.\n\n\\\\      Write a backslash character.\n\n\\num    Write an 8-bit character whose ASCII value is the\n1-, 2-, or 3-digit octal number num.\n\nEach format specification is introduced by the percent character\n(``%'').  The remainder of the format specification includes, in\nthe following order:\n\nZero or more of the following flags:\n\n#       A `#' character specifying that the value should\nbe printed in an ``alternative form''.  For b, c,\nd, and s formats, this option has no effect.  For\nthe o format the precision of the number is in-\ncreased to force the first character of the output\nstring to a zero.  For the x (X) format, a non-\nzero result has the string 0x (0X) prepended to\nit.  For e, E, f, g, and G formats, the result\nwill always contain a decimal point, even if no\ndigits follow the point (normally, a decimal point\nonly appears in the results of those formats if a\ndigit follows the decimal point).  For g and G\nformats, trailing zeros are not removed from the\nresult as they would otherwise be.\n\n-       A minus sign `-' which specifies left adjustment\nof the output in the indicated field;\n\n+       A `+' character specifying that there should al-\nways be a sign placed before the number when using\nsigned formats.\n\n' '     A space specifying that a blank should be left be-\nfore a positive number for a signed format.  A `+'\noverrides a space if both are used;\n\n0       A zero `0' character indicating that zero-padding\nshould be used rather than blank-padding.  A `-'\noverrides a `0' if both are used;\n\nField Width:\nAn optional digit string specifying a field width; if the\noutput string has fewer characters than the field width it\nwill be blank-padded on the left (or right, if the left-\nadjustment indicator has been given) to make up the field\nwidth (note that a leading zero is a flag, but an embedded\nzero is part of a field width);\n\nPrecision:\nAn optional period, '.', followed by an optional digit\nstring giving a precision which specifies the number of\ndigits to appear after the decimal point, for e and f for-\nmats, or the maximum number of bytes to be printed from a\nstring (b and s formats); if the digit string is missing,\nthe precision is treated as zero;\n\nFormat:\nA character which indicates the type of format to use (one\nof diouxXfwEgGbcs).\n\nA field width or precision may be '*' instead of a digit string.\nIn this case an argument supplies the field width or precision.\n\nThe format characters and their meanings are:\n\ndiouXx      The argument is printed as a signed decimal (d or i),\nunsigned octal, unsigned decimal, or unsigned hexadec-\nimal (X or x), respectively.\n\nf           The argument is printed in the style [-]ddd.ddd where\nthe number of d's after the decimal point is equal to\nthe precision specification for the argument.  If the\nprecision is missing, 6 digits are given; if the pre-\ncision is explicitly 0, no digits and no decimal point\nare printed.\n\neE          The argument is printed in the style [-]d.ddde+-dd\nwhere there is one digit before the decimal point and\nthe number after is equal to the precision specifica-\ntion for the argument; when the precision is missing,\n6 digits are produced.  An upper-case E is used for an\n`E' format.\n\ngG          The argument is printed in style f or in style e (E)\nwhichever gives full precision in minimum space.\n\nb           Characters from the string argument are printed with\nbackslash-escape sequences expanded.\nThe following additional backslash-escape sequences\nare supported:\n\n\\c      Causes dash to ignore any remaining characters\nin the string operand containing it, any re-\nmaining string operands, and any additional\ncharacters in the format operand.\n\n\\0num   Write an 8-bit character whose ASCII value is\nthe 1-, 2-, or 3-digit octal number num.\n\nc           The first character of argument is printed.\n\ns           Characters from the string argument are printed until\nthe end is reached or until the number of bytes indi-\ncated by the precision specification is reached; if\nthe precision is omitted, all characters in the string\nare printed.\n\n%           Print a `%'; no argument is used.\n\nIn no case does a non-existent or small field width cause trunca-\ntion of a field; padding takes place only if the specified field\nwidth exceeds the actual width.\n\nset [{ -options | +options | -- }] arg ...\nThe set command performs three different functions.\n\nWith no arguments, it lists the values of all shell variables.\n\nIf options are given, it sets the specified option flags, or\nclears them as described in the section called Argument List\nProcessing.  As a special case, if the option is -o or +o and no\nargument is supplied, the shell prints the settings of all its op-\ntions.  If the option is -o, the settings are printed in a human-\nreadable format; if the option is +o, the settings are printed in\na format suitable for reinput to the shell to affect the same op-\ntion settings.\n\nThe third use of the set command is to set the values of the\nshell's positional parameters to the specified args.  To change\nthe positional parameters without changing any options, use \"--\"\nas the first argument to set.  If no args are present, the set\ncommand will clear all the positional parameters (equivalent to\nexecuting \"shift $#\".)\n\nshift [n]\nShift the positional parameters n times.  A shift sets the value\nof $1 to the value of $2, the value of $2 to the value of $3, and\nso on, decreasing the value of $# by one.  If n is greater than\nthe number of positional parameters, shift will issue an error\nmessage, and exit with return status 2.\n\ntest expression\n\n[ expression ]\nThe test utility evaluates the expression and, if it evaluates to\ntrue, returns a zero (true) exit status; otherwise it returns 1\n(false).  If there is no expression, test also returns 1 (false).\n\nAll operators and flags are separate arguments to the test util-\nity.\n\nThe following primaries are used to construct expression:\n\n-b file       True if file exists and is a block special file.\n\n-c file       True if file exists and is a character special file.\n\n-d file       True if file exists and is a directory.\n\n-e file       True if file exists (regardless of type).\n\n-f file       True if file exists and is a regular file.\n\n-g file       True if file exists and its set group ID flag is\nset.\n\n-h file       True if file exists and is a symbolic link.\n\n-k file       True if file exists and its sticky bit is set.\n\n-n string     True if the length of string is nonzero.\n\n-p file       True if file is a named pipe (FIFO).\n\n-r file       True if file exists and is readable.\n\n-s file       True if file exists and has a size greater than\nzero.\n\n-t filedescriptor\nTrue if the file whose file descriptor number is\nfiledescriptor is open and is associated with a\nterminal.\n\n-u file       True if file exists and its set user ID flag is set.\n\n-w file       True if file exists and is writable.  True indicates\nonly that the write flag is on.  The file is not\nwritable on a read-only file system even if this\ntest indicates true.\n\n-x file       True if file exists and is executable.  True indi-\ncates only that the execute flag is on.  If file is\na directory, true indicates that file can be\nsearched.\n\n-z string     True if the length of string is zero.\n\n-L file       True if file exists and is a symbolic link.  This\noperator is retained for compatibility with previous\nversions of this program.  Do not rely on its exis-\ntence; use -h instead.\n\n-O file       True if file exists and its owner matches the effec-\ntive user id of this process.\n\n-G file       True if file exists and its group matches the effec-\ntive group id of this process.\n\n-S file       True if file exists and is a socket.\n\nfile1 -nt file2\nTrue if file1 and file2 exist and file1 is newer\nthan file2.\n\nfile1 -ot file2\nTrue if file1 and file2 exist and file1 is older\nthan file2.\n\nfile1 -ef file2\nTrue if file1 and file2 exist and refer to the same\nfile.\n\nstring        True if string is not the null string.\n\ns1 = s2       True if the strings s1 and s2 are identical.\n\ns1 != s2      True if the strings s1 and s2 are not identical.\n\ns1 < s2       True if string s1 comes before s2 based on the ASCII\nvalue of their characters.\n\ns1 > s2       True if string s1 comes after s2 based on the ASCII\nvalue of their characters.\n\nn1 -eq n2     True if the integers n1 and n2 are algebraically\nequal.\n\nn1 -ne n2     True if the integers n1 and n2 are not algebraically\nequal.\n\nn1 -gt n2     True if the integer n1 is algebraically greater than\nthe integer n2.\n\nn1 -ge n2     True if the integer n1 is algebraically greater than\nor equal to the integer n2.\n\nn1 -lt n2     True if the integer n1 is algebraically less than\nthe integer n2.\n\nn1 -le n2     True if the integer n1 is algebraically less than or\nequal to the integer n2.\n\nThese primaries can be combined with the following operators:\n\n! expression  True if expression is false.\n\nexpression1 -a expression2\nTrue if both expression1 and expression2 are true.\n\nexpression1 -o expression2\nTrue if either expression1 or expression2 are true.\n\n(expression)  True if expression is true.\n\nThe -a operator has higher precedence than the -o operator.\n\ntimes  Print the accumulated user and system times for the shell and for\nprocesses run from the shell.  The return status is 0.\n\ntrap [action signal ...]\nCause the shell to parse and execute action when any of the speci-\nfied signals are received.  The signals are specified by signal\nnumber or as the name of the signal.  If signal is 0 or EXIT, the\naction is executed when the shell exits.  action may be empty\n(''), which causes the specified signals to be ignored.  With\naction omitted or set to `-' the specified signals are set to\ntheir default action.  When the shell forks off a subshell, it re-\nsets trapped (but not ignored) signals to the default action.  The\ntrap command has no effect on signals that were ignored on entry\nto the shell.  trap without any arguments cause it to write a list\nof signals and their associated action to the standard output in a\nformat that is suitable as an input to the shell that achieves the\nsame trapping results.\n\nExamples:\n\ntrap\n\nList trapped signals and their corresponding action\n\ntrap '' INT QUIT tstp 30\n\nIgnore signals INT QUIT TSTP USR1\n\ntrap date INT\n\nPrint date upon receiving signal INT\n\ntype [name ...]\nInterpret each name as a command and print the resolution of the\ncommand search.  Possible resolutions are: shell keyword, alias,\nshell builtin, command, tracked alias and not found.  For aliases\nthe alias expansion is printed; for commands and tracked aliases\nthe complete pathname of the command is printed.\n\nulimit [-H | -S] [-a | -tfdscmlpnv [value]]\nInquire about or set the hard or soft limits on processes or set\nnew limits.  The choice between hard limit (which no process is\nallowed to violate, and which may not be raised once it has been\nlowered) and soft limit (which causes processes to be signaled but\nnot necessarily killed, and which may be raised) is made with\nthese flags:\n\n-H          set or inquire about hard limits\n\n-S          set or inquire about soft limits.  If neither -H nor\n-S is specified, the soft limit is displayed or both\nlimits are set.  If both are specified, the last one\nwins.\n\nThe limit to be interrogated or set, then, is chosen by specifying\nany one of these flags:\n\n-a          show all the current limits\n\n-t          show or set the limit on CPU time (in seconds)\n\n-f          show or set the limit on the largest file that can be\ncreated (in 512-byte blocks)\n\n-d          show or set the limit on the data segment size of a\nprocess (in kilobytes)\n\n-s          show or set the limit on the stack size of a process\n(in kilobytes)\n\n-c          show or set the limit on the largest core dump size\nthat can be produced (in 512-byte blocks)\n\n-m          show or set the limit on the total physical memory\nthat can be in use by a process (in kilobytes)\n\n-l          show or set the limit on how much memory a process can\nlock with mlock(2) (in kilobytes)\n\n-p          show or set the limit on the number of processes this\nuser can have at one time\n\n-n          show or set the limit on the number files a process\ncan have open at once\n\n-v          show or set the limit on the total virtual memory that\ncan be in use by a process (in kilobytes)\n\n-r          show or set the limit on the real-time scheduling pri-\nority of a process\n\nIf none of these is specified, it is the limit on file size that\nis shown or set.  If value is specified, the limit is set to that\nnumber; otherwise the current limit is displayed.\n\nLimits of an arbitrary process can be displayed or set using the\nsysctl(8) utility.\n\numask [mask]\nSet the value of umask (see umask(2)) to the specified octal\nvalue.  If the argument is omitted, the umask value is printed.\n\nunalias [-a] [name]\nIf name is specified, the shell removes that alias.  If -a is\nspecified, all aliases are removed.\n\nunset [-fv] name ...\nThe specified variables and functions are unset and unexported.\nIf -f or -v is specified, the corresponding function or variable\nis unset, respectively.  If a given name corresponds to both a\nvariable and a function, and no options are given, only the vari-\nable is unset.\n\nwait [job]\nWait for the specified job to complete and return the exit status\nof the last process in the job.  If the argument is omitted, wait\nfor all jobs to complete and return an exit status of zero.\n\nCommand Line Editing\nWhen dash is being used interactively from a terminal, the current com-\nmand and the command history (see fc in Builtins) can be edited using vi-\nmode command-line editing.  This mode uses commands, described below,\nsimilar to a subset of those described in the vi man page.  The command\n'set -o vi' enables vi-mode editing and places sh into vi insert mode.\nWith vi-mode enabled, sh can be switched between insert mode and command\nmode.  It is similar to vi: typing <ESC> enters vi command mode.  Hitting\n<return> while in command mode will pass the line to the shell.\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "Errors that are detected by the shell, such as a syntax error, will cause\nthe shell to exit with a non-zero exit status.  If the shell is not an\ninteractive shell, the execution of the shell file will be aborted.  Oth-\nerwise the shell will return the exit status of the last command exe-\ncuted, or if the exit builtin is used with a numeric argument, it will\nreturn the argument.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "HOME       Set automatically by login(1) from the user's login directory\nin the password file (passwd(4)).  This environment variable\nalso functions as the default argument for the cd builtin.\n\nPATH       The default search path for executables.  See the above sec-\ntion Path Search.\n\nCDPATH     The search path used with the cd builtin.\n\nMAIL       The name of a mail file, that will be checked for the arrival\nof new mail.  Overridden by MAILPATH.\n\nMAILCHECK  The frequency in seconds that the shell checks for the arrival\nof mail in the files specified by the MAILPATH or the MAIL\nfile.  If set to 0, the check will occur at each prompt.\n\nMAILPATH   A colon \":\" separated list of file names, for the shell to\ncheck for incoming mail.  This environment setting overrides\nthe MAIL setting.  There is a maximum of 10 mailboxes that can\nbe monitored at once.\n\nPS1        The primary prompt string, which defaults to \"$ \", unless you\nare the superuser, in which case it defaults to \"# \".\n\nPS2        The secondary prompt string, which defaults to \"> \".\n\nPS4        Output before each line when execution trace (set -x) is en-\nabled, defaults to \"+ \".\n\nIFS        Input Field Separators.  This is normally set to <space>,\n<tab>, and <newline>.  See the White Space Splitting section\nfor more details.\n\nTERM       The default terminal setting for the shell.  This is inherited\nby children of the shell, and is used in the history editing\nmodes.\n\nHISTSIZE   The number of lines in the history buffer for the shell.\n\nPWD        The logical value of the current working directory.  This is\nset by the cd command.\n\nOLDPWD     The previous logical value of the current working directory.\nThis is set by the cd command.\n\nPPID       The process ID of the parent process of the shell.\n",
            "subsections": []
        },
        "FILES": {
            "content": "$HOME/.profile\n\n/etc/profile\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "csh(1), echo(1), getopt(1), ksh(1), login(1), printf(1), test(1),\ngetopt(3), passwd(5), environ(7), sysctl(8)\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "dash is a POSIX-compliant implementation of /bin/sh that aims to be as\nsmall as possible.  dash is a direct descendant of the NetBSD version of\nash (the Almquist SHell), ported to Linux in early 1997.  It was renamed\nto dash in 2002.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Setuid shell scripts should be avoided at all costs, as they are a sig-\nnificant security risk.\n\nPS1, PS2, and PS4 should be subject to parameter expansion before being\ndisplayed.\n\nBSD                            January 19, 2003                            BSD",
            "subsections": []
        }
    },
    "summary": "dash -- command interpreter (shell)",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "csh",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/csh/1/json"
        },
        {
            "name": "echo",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/echo/1/json"
        },
        {
            "name": "getopt",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/getopt/1/json"
        },
        {
            "name": "ksh",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ksh/1/json"
        },
        {
            "name": "login",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/login/1/json"
        },
        {
            "name": "printf",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/printf/1/json"
        },
        {
            "name": "test",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/test/1/json"
        },
        {
            "name": "getopt",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/getopt/3/json"
        },
        {
            "name": "passwd",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/passwd/5/json"
        },
        {
            "name": "environ",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/environ/7/json"
        },
        {
            "name": "sysctl",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sysctl/8/json"
        }
    ]
}