⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bash.1

📁 android-w.song.android.widget
💻 1
📖 第 1 页 / 共 5 页
字号:
The number ofparameters to the current subroutine (shell function or script executedwith \fB.\fP or \fBsource\fP) is at the top of the stack.When a subroutine is executed, the number of parameters passed is pushed onto.SM.BR BASH_ARGC .The shell sets.SM.B BASH_ARGConly when in extended debugging mode (see the description of the.B extdebugoption to the.B shoptbuiltin below).TP.B BASH_ARGVAn array variable containing all of the parameters in the current \fBbash\fPexecution call stack.  The final parameter of the last subroutine callis at the top of the stack; the first parameter of the initial call isat the bottom.  When a subroutine is executed, the parameters suppliedare pushed onto.SM.BR BASH_ARGV .The shell sets.SM.B BASH_ARGVonly when in extended debugging mode(see the description of the.B extdebugoption to the.B shoptbuiltin below).TP.B BASH_CMDSAn associative array variable whose members correspond to the internalhash table of commands as maintained by the \fBhash\fP builtin.Elements added to this array appear in the hash table; unsetting arrayelements cause commands to be removed from the hash table..TP.B BASH_COMMANDThe command currently being executed or about to be executed, unless theshell is executing a command as the result of a trap,in which case it is the command executing at the time of the trap..TP.B BASH_EXECUTION_STRINGThe command argument to the \fB\-c\fP invocation option..TP.B BASH_LINENOAn array variable whose members are the line numbers in source fileswhere each corresponding member of.SM.B FUNCNAMEwas invoked.\fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP is the line number in the sourcefile (\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP) where\fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP was called(or \fB${BASH_LINENO[\fP\fI$i-1\fP\fB]}\fP if referenced within anothershell function).Use.SM.B LINENOto obtain the current line number..TP.B BASH_REMATCHAn array variable whose members are assigned by the \fB=~\fP binaryoperator to the \fB[[\fP conditional command.The element with index 0 is the portion of the stringmatching the entire regular expression.The element with index \fIn\fP is the portion of thestring matching the \fIn\fPth parenthesized subexpression.This variable is read-only..TP.B BASH_SOURCEAn array variable whose members are the source filenameswhere the corresponding shell function names in the.SM.B FUNCNAMEarray variable are defined.The shell function\fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP is defined in the file\fB${BASH_SOURCE[\fP\fI$i\fP\fB]}\fP and called from\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP..TP.B BASH_SUBSHELLIncremented by one each time a subshell or subshell environment is spawned.The initial value is 0..TP.B BASH_VERSINFOA readonly array variable whose members hold version information forthis instance of.BR bash .The values assigned to the array members are as follows:.sp .5.RS.TP 24.B BASH_VERSINFO[\fR0\fP]The major version number (the \fIrelease\fP)..TP.B BASH_VERSINFO[\fR1\fP]The minor version number (the \fIversion\fP)..TP.B BASH_VERSINFO[\fR2\fP]The patch level..TP.B BASH_VERSINFO[\fR3\fP]The build version..TP.B BASH_VERSINFO[\fR4\fP]The release status (e.g., \fIbeta1\fP)..TP.B BASH_VERSINFO[\fR5\fP]The value of.SM.BR MACHTYPE ..RE.TP.B BASH_VERSIONExpands to a string describing the version of this instance of.BR bash ..TP.B COMP_CWORDAn index into \fB${COMP_WORDS}\fP of the word containing the currentcursor position.This variable is available only in shell functions invoked by theprogrammable completion facilities (see \fBProgrammable Completion\fPbelow)..TP.B COMP_KEYThe key (or final key of a key sequence) used to invoke the currentcompletion function..TP.B COMP_LINEThe current command line.This variable is available only in shell functions and externalcommands invoked by theprogrammable completion facilities (see \fBProgrammable Completion\fPbelow)..TP.B COMP_POINTThe index of the current cursor position relative to the beginning ofthe current command.If the current cursor position is at the end of the current command,the value of this variable is equal to \fB${#COMP_LINE}\fP.This variable is available only in shell functions and externalcommands invoked by theprogrammable completion facilities (see \fBProgrammable Completion\fPbelow)..TP.B COMP_TYPESet to an integer value corresponding to the type of completion attemptedthat caused a completion function to be called:\fITAB\fP, for normal completion,\fI?\fP, for listing completions after successive tabs,\fI!\fP, for listing alternatives on partial word completion,\fI@\fP, to list completions if the word is not unmodified,or\fI%\fP, for menu completion.This variable is available only in shell functions and externalcommands invoked by theprogrammable completion facilities (see \fBProgrammable Completion\fPbelow)..TP.B COMP_WORDBREAKSThe set of characters that the \fBreadline\fP library treats as wordseparators when performing word completion.If.SM.B COMP_WORDBREAKSis unset, it loses its special properties, even if it issubsequently reset..TP.B COMP_WORDSAn array variable (see \fBArrays\fP below) consisting of the individualwords in the current command line.The line is split into words as \fBreadline\fP would split it, using.SM.B COMP_WORDBREAKSas described above.This variable is available only in shell functions invoked by theprogrammable completion facilities (see \fBProgrammable Completion\fPbelow)..TP.B COPROCAn array variable (see \fBArrays\fP below) created to hold the file descriptorsfor output from and input to an unnamed coprocess (see \fBCoprocesses\fPabove)..TP.B DIRSTACKAn array variable (see.B Arraysbelow) containing the current contents of the directory stack.Directories appear in the stack in the order they are displayed by the.B dirsbuiltin.Assigning to members of this array variable may be used to modifydirectories already in the stack, but the.B pushdand.B popdbuiltins must be used to add and remove directories.Assignment to this variable will not change the current directory.If.SM.B DIRSTACKis unset, it loses its special properties, even if it issubsequently reset..TP.B EUIDExpands to the effective user ID of the current user, initialized atshell startup.  This variable is readonly..TP.B FUNCNAMEAn array variable containing the names of all shell functionscurrently in the execution call stack.The element with index 0 is the name of any currently-executingshell function.The bottom-most element (the one with the highest index) is.if t \f(CW"main"\fP..if n "main".This variable exists only when a shell function is executing.Assignments to.SM.B FUNCNAMEhave no effect and return an error status.If.SM.B FUNCNAMEis unset, it loses its special properties, even if it issubsequently reset..if t .sp 0.5.if n .sp 1This variable can be used with \fBBASH_LINENO\fP and \fBBASH_SOURCE\fP.Each element of \fBFUNCNAME\fP has corresponding elements in\fBBASH_LINENO\fP and \fBBASH_SOURCE\fP to describe the call stack.For instance, \fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP was called from the file\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP at line number\fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP.The \fBcaller\fP builtin displays the current call stack using thisinformation..TP.B GROUPSAn array variable containing the list of groups of which the currentuser is a member.Assignments to    .SM.B GROUPShave no effect and return an error status.If.SM.B GROUPSis unset, it loses its special properties, even if it issubsequently reset..TP.B HISTCMDThe history number, or index in the history list, of the currentcommand.If.SM.B HISTCMDis unset, it loses its special properties, even if it issubsequently reset..TP.B HOSTNAMEAutomatically set to the name of the current host..TP.B HOSTTYPEAutomatically set to a string that uniquelydescribes the type of machine on which.B bashis executing.The default is system-dependent..TP.B LINENOEach time this parameter is referenced, the shell substitutesa decimal number representing the current sequential line number(starting with 1) within a script or function.  When not in ascript or function, the value substituted is not guaranteed tobe meaningful.If.SM.B LINENOis unset, it loses its special properties, even if it issubsequently reset..TP.B MACHTYPEAutomatically set to a string that fully describes the systemtype on which.B bashis executing, in the standard GNU \fIcpu-company-system\fP format.The default is system-dependent..TP.B MAPFILEAn array variable (see \fBArrays\fP below) created to hold the textread by the \fBmapfile\fP builtin when no variable name is supplied..TP.B OLDPWDThe previous working directory as set by the.B cdcommand..TP.B OPTARGThe value of the last option argument processed by the.B getoptsbuiltin command (see.SM.B SHELL BUILTIN COMMANDSbelow)..TP.B OPTINDThe index of the next argument to be processed by the.B getoptsbuiltin command (see.SM.B SHELL BUILTIN COMMANDSbelow)..TP.B OSTYPEAutomatically set to a string thatdescribes the operating system on which.B bashis executing.The default is system-dependent..TP.B PIPESTATUSAn array variable (see.B Arraysbelow) containing a list of exit status values from the processesin the most-recently-executed foreground pipeline (which maycontain only a single command)..TP.B PPIDThe process ID of the shell's parent.  This variable is readonly..TP.B PWDThe current working directory as set by the.B cdcommand..TP.B RANDOMEach time this parameter is referenced, a random integer between0 and 32767 isgenerated.  The sequence of random numbers may be initialized by assigninga value to.SM.BR RANDOM .If.SM.B RANDOMis unset, it loses its special properties, even if it issubsequently reset..TP.B READLINE_LINEThe contents of the.B readlineline buffer, for use with.if t \f(CWbind -x\fP.if n "bind -x"(see.SM.B "SHELL BUILTIN COMMANDS"below)..TP.B READLINE_POINTThe position of the insertion point in the.B readlineline buffer, for use with.if t \f(CWbind -x\fP.if n "bind -x"(see.SM.B "SHELL BUILTIN COMMANDS"below)..TP.B REPLYSet to the line of input read by the.B readbuiltin command when no arguments are supplied..TP.B SECONDSEach time this parameter isreferenced, the number of seconds since shell invocation is returned.  If avalue is assigned to .SM.BR SECONDS ,the value returned upon subsequentreferences isthe number of seconds since the assignment plus the value assigned.If.SM.B SECONDSis unset, it loses its special properties, even if it issubsequently reset..TP.B SHELLOPTSA colon-separated list of enabled shell options.  Each word inthe list is a valid argument for the.B \-ooption to the.B setbuiltin command (see.SM.B "SHELL BUILTIN COMMANDS"below).  The options appearing in.SM.B SHELLOPTSare those reported as.I onby \fBset \-o\fP.If this variable is in the environment when.B bashstarts up, each shell option in the list will be enabled beforereading any startup files.This variable is read-only..TP.B SHLVLIncremented by one each time an instance of.B bashis started..TP.B UIDExpands to the user ID of the current user, initialized at shell startup.This variable is readonly..PD.PPThe following variables are used by the shell.  In some cases,.B bashassigns a default value to a variable; these cases are notedbelow..PP.PD 0.TP.B BASH_ENVIf this parameter is set when \fBbash\fP is executing a shell script,its value is interpreted as a filename containing commands toinitialize the shell, as in.IR ~/.bashrc .The value of.SM.B BASH_ENVis subjected to parameter expansion, command substitution, and arithmeticexpansion before being interpreted as a file name..SM.B PATHis not used to search for the resultant file name..TP.B BASH_XTRACEFDIf set to an integer corresponding to a valid file descriptor, \fBbash\fPwill write the trace output generated when.if t \f(CWset -x\fP.if n \fIset -x\fPis enabled to that file descriptor.The file descriptor is closed when.SM.B BASH_XTRACEFDis unset or assigned a new value.Unsetting.SM.B BASH_XTRACEFDor assigning it the empty string causes thetrace output to be sent to the standard error.Note that setting

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -