eval

evaluate arguments in the KornShell

KornShell Built-in


SYNOPSIS

eval [argument ...]


DESCRIPTION

The KornShell evaluates each argument as it would for any command. eval then concatenates the resulting strings, separated by spaces, and evaluates and executes this string in the current shell environment.


EXAMPLES

The command:
for a in 1 2 3
do
  eval x$a=fred
done
sets variables x1, x2 and x3 to fred. Once this has been done,
echo $x1 $x2 $x3
produces:
fred fred fred


DIAGNOSTICS

Possible exit status values are:
0

You specified no arguments or the specified arguments were empty strings.

Otherwise, the exit status of eval is the exit status of the command that eval executes.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0.


NOTE

This is a special built-in command of the MKS KornShell.


SEE ALSO

Commands:
exec, sh


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]