This question already has an answer here:

  1. What is the purpose of running a command with eval?

  2. What kinds of commands can eval run? 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?

  3. Compare running a command directly in a shell and indirectly via eval. Is the difference only in that with eval the command will be parsed twice instead of just once?

  4. Compare running a command via eval and via command. Assume that the command can be run by both. What differences are between the two ways?

marked as duplicate by Wildcard, Jeff Schaller, Jakuje, don_crissti, Anthon Apr 22 '16 at 22:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


After the Command-line has been expanded:

eval sends back the arguments to the first step of "Command-Line Processing".

All steps of Command-Line Processing are presented in this page.

Not the answer you're looking for? Browse other questions tagged or ask your own question.