This question already has an answer here:
- What is the “eval” command in bash? 7 answers
What is the purpose of running a command with
What kinds of commands can
evalrun? I find it can run builtin command, external executable command, pipeline, script. Can it run all kinds of commands which can be run in a shell directly?
Compare running a command directly in a shell and indirectly via
eval. Is the difference only in that with
evalthe command will be parsed twice instead of just once?
Compare running a command via
command. Assume that the command can be run by both. What differences are between the two ways?