Bash internal variable, Bash variable
Bash internal variables
Some internal commands are invisible in the directory list. They are provided by the Shell itself. Common internal Commands include echo, eval, execexport, readonly, read, shift, wait, exit and point (.)
Echo variable table
Display the specified variable in the variable table to the standard output.
Evalargs
Read The args parameters, combine them into a new command, and then execute
Exec Command Parameters
When the Shell executes the exec statement, it does not create a new sub-process, but instead executes the new command. When the specified command is executed, the process (that is, the original Shell) so the statement after exec in the Shell program will not be executed.
Export variable name = value
Shell can use export to break its variables down into the sub-Shell, so that the sub-process inherits the environment variables in the parent process, but the sub-Shell cannot use export to bring its variables up into the parent Shell
Readonly variable name
Quasi-input reading character bed from edge to pass to specified variable
Shift statement
The Shift statement renames all the location parameter variables as follows, that is, $2 becomes $1, $3 becomes $2... Every shift statement used in the program makes all positions move one position to the left at a time, and the position parameter $ # is reduced by 1 until it is reduced to 0.
Ssh-copy-id-I pub
Vi/usr/bin/ssh-copy-id
Example:
If ["-I" = "$1"]; then
Shift
# Check if we have 2 parameters left, if so the first is the new ID file
If [-n "$2"]; then
If expr "$1": ". * \. pub"; then
ID_FILE = "$1"
Else
ID_FILE = "$ 1.pub"
Fi
Shift # and this shouldleave $1 as the target name
Fi
Else
If [x $ SSH_AUTH_SOCK! = X]; then
GET_ID = "$ GET_ID ssh-add-L"
I can feel it. I just like it. Your likes are the greatest motivation for my progress.