evalevaluate arguments in the KornShell |
KornShell Built-in |
eval
[argument ...]
eval
then concatenates the resulting strings, separated by
spaces, and evaluates and executes this string in the current shell environment.
sets variables x1, x2 and x3 to fred. Once this has been done,for a in 1 2 3 do eval x$a=fred done
produces:echo $x1 $x2 $x3
fred fred fred
0
You specified no arguments or the specified arguments were empty strings.
eval
is the exit
status of the command that eval
executes.