EVAL(1) General Commands Manual EVAL(1)

evalconstruct command by concatenating arguments

eval [argument ...]

The eval utility shall construct a command by concatenating arguments together, separating each with a <space>. The constructed command shall be read and executed by the shell.

If there are no arguments, or only null arguments, eval shall return a zero exit status; otherwise, it shall return the exit status of the command defined by the string of concatenated arguments separated by spaces.

3.14 Special Built-in Utilities 249

Example: foo=10 x=foo y=’$’$x echo $y $foo eval y=’$’$x echo $y 10

September 1991 posix.fail