Examples of using Shell variable in English and their translations into Chinese
{-}
-
Political
-
Ecclesiastic
-
Programming
What is a Shell variable?
Shell variables and programs.
What Are Shell Variables?
The$ is a shell variable.
In Linux, the dollar sign($) stands for a shell variable.
Using Shell Variables and Quoting.
The exit code of the previous command is stored in the shell variable$?
Read-only shell variables cannot be unset.
PYTHONPATH(a list of directory names, with the same syntax as the shell variable PATH).
There are shell variables and environment variables. .
For example, the following creates a shell variable and then prints it:.
Shell variables store the value of a string or a number for the shell to read.
This has the same syntax as the shell variable PATH, that is, a list of directory names.
PYTHONPATH(a list of directory names, with the same syntax as the shell variable PATH).
It unsets a shell variable, removing it from memory and the shell's exported environment.
PYTHONPATH(a list of directory names, with the same syntax as the shell variable PATH).
Similarly, Shell variables are used to store information and they can by the shell only.
Most often single quotes are used,to avoid having the shell interpret$ as a shell variable.
Unix-type shells support two kinds of variables: shell variables and environment variables. .
Standard UNIX variables are split into two categories,environment variables and shell variables.
In broad terms, shell variables apply only to the current instance of the shell and are used to set short-term working conditions;
The default secondary prompt isgt;(the greater than sign),but can be changed by re-defining the PS2 shell variable-.
Each time the shell variables home, user and term are changed, the corresponding environment variables HOME, USER and TERM receive the same values.
You can also learn about Korn shell scripting(June 2008)and Tcsh shell variables(August 2008).
For example, to change the number of shell commands saved in the history list,you need to set the shell variable history.
Double quotes are used, such as"s/$1/$2/g", to allow the shell to substitute for a command line argument orother shell variable.