This command has not been used before, on the Internet to check the information, I think people write very well, so copied over.
Title: Use of the Linux command eval
Links: http://blog.chinaunix.net/uid-21411227-id-1826706.html
Title: eval in the Linux shell
Links: http://www.2cto.com/os/201311/255577.html
Syntax: eval cmdline
Eval will perform a two-pass scan of the subsequent cmdline, execute this command if CmdLine is a normal command after the first sweep of the face, and if CmdLine contains an indirect reference to the variable, the semantics of the introduction reference is guaranteed.
Examples are as follows:
Set 11 22 33 44
If you want to output the most recent parameter, which is 44, you can use the following command,
Echo $4
But if we don't know a few parameters, to output the last parameter, you might think of using $ #来输出最后一个参数,
If you use the command:
echo "\$$#"
The result is $4, not what we want. 44. Here is a reference to a variable introduction to the problem, our intention is to output $4, by default, after the command ignores variable introduction reference case.
At this point, you can use the eval command.
Eval echo "\$$#"
The results are 44.
The eval command in Linux