Bash reference manual 5 (shell variable) continued 3

Source: Internet
Author: User

LINENO

The row number of the script or shell function currently being executed.

LINES

The select command is used to determine the width of the selected columns. After receiving SIGWINCH, It is set automatically.

MACHTYPE

Is a string that describes the type of the system that is running Bash. The format of the description complies with the GNU cpu-company-system standard.

MAILCHECK

Determine the interval (in seconds). The shell will check the email in the file specified by the MAILPATH and MAIL variables. The default value is 60 seconds. When the email check time is reached, shell performs the check action before the prompt is displayed. If this variable is unset or set to a value smaller than or equal to 0, shell does not perform email check.

MAPFILE

Is an array variable. When you run the built-in command mapfile without specifying the variable name, this variable is automatically created and the text read by mapfile is stored.

OLDPWD

The previous working directory set by the built-in command cd.

OPTERR

If the value is 1, Bash displays the error message generated by the built-in command getopts.

OSTYPE

Is a string that describes the operating system in which Bash is running.

PIPESTATUS

It is an array variable (see the array section) that contains a list of exit Status values from the recently executed frontend pipeline (may only contain one simple command) process.

POSIXLY_CORRECT

If this variable exists in the environment when Bash is started, shell enters the POSIX mode before reading the Startup File (see the Bash POSIX mode Section), just as it has the -- posix option. If this variable is set during shell Running, bash enters POSIX mode, as if this command is executed:

Set-o posix

PPID

The ID of the parent process of the shell. Read-only.

PROMPT_COMMAND

If this parameter is set, the value of this variable is treated as a command and executed before each prompt ($ PS1) is printed.

PROMPT_DIRTRIM

If it is set to a value greater than 0, this value is used to retain the number of tail directory components when the \ w and \ W prompt strings are extended. (See the print prompt section) The removed characters are replaced by a ellipsis.

PS3

The value of this variable is used at the select command prompt. If not set, the select command prompt is '#? '.

PS4

When the-x option is used, the value of this variable is used to print the prompt before the command line is displayed. When necessary, the first character of PS4 is used multiple times to indicate multi-layer reference. The default value is '+ '.

PWD

The current working directory set by the built-in command cd.

RANDOM

Each time you reference this parameter, a random integer between 0 and is generated. If this variable is assigned, the seed of the random number generator is specified.

READLINE_LINE

The content of the row buffer in Readline can be used with the command 'Bind-x. (See Bash built-in commands)

READLINE_POINT

The position of the insert point in the row buffer of Readline, Which is used with the command 'Bind-x. (See Bash built-in commands)

REPLY

The default variable of the built-in read command.

SECONDS

This variable is extended to the number of seconds after shell startup. If you assign a value to this variable, the Count value is reset to the assigned value, and the extended value is changed to the value assigned plus the number of seconds that have elapsed since the assignment.

SHELL

This environment variable saves the full path name of the shell. If this variable is not set during shell startup, Bash sets it to the full path name of the logon shell of the current user.

SHELLOPTS

List of shell OPTIONS enabled by colons. Each word in the list is a valid parameter of the-o option of the built-in command set (see the built-in command Set ). The options that appear in SHELLOPTS are the options that the 'set-o' command reports as on. If this variable exists in the environment when Bash is started, every shell option in the list is enabled before reading the Startup File. Read-only.

SHLVL

Add 1 when a new Bash instance starts. Represents the depth of Bash nesting.

TIMEFORMAT

The value of this variable is used to format a string to determine how time information is displayed-for pipeline commands with a time reserved word prefix. The '%' character introduces an escape sequence, which is extended as a time value or other information. Escape sequences and their meanings are as follows. Square brackets indicate the optional parts.

%

Character '% '.

% [P] [l] R

Time consumed, in seconds.

% [P] [l] U

The number of seconds of the CPU in user mode.

% [P] [l] S

The number of seconds of the CPU in system mode.

% P

CPU usage, equal to (% U + % S)/% R.

Option p is a number to specify the precision. It is the number of digits after the decimal point. If the value is 0, the decimal point and subsequent digits are not output. You can specify three digits after the decimal point. The number greater than 3 is changed to three. If no p is specified, 3 is used.

Option l specifies the long format, including minutes, in the form of MMmSS. FFs. Option p determines whether to display the fractional part.

If this variable is not set, Bash is treated as the following value:

$ '\ Nreal \ t % 3lR \ nuser \ t % 3lU \ nsys \ t % 3lS'

If the value is null, no time information is displayed. When a formatted string is displayed, a line break is added at the end of the line.

TMOUT

If the value is greater than 0, TMOUT is treated as the default timeout value of the built-in read command (see Bash built-in command ). When the input is from the terminal, if the input is not received in seconds after TMOUT, the select command (see the condition structure) ends.

In the interactive shell, this value is treated as the number of seconds that the interactive shell waits after the prompt is displayed. If no input is made after the specified number of seconds, Bash exits.

TMPDIR

If set, Bash uses this value as the directory name for creating a temporary file for shell.

UID

ID of the current user in digital format. Read-only.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.