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.


EXAMPLE

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. All UNIX systems. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


NOTE

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


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC Windchill Requirements and Validation


SEE ALSO

Commands:
exec, sh


PTC MKS Toolkit 10.4 Documentation Build 39.