EVAL

Section: User Commands (1)
Updated: MS-DOS auxiliary utilities
Index Return to Main Contents
 

NAME

eval - evaluate a command after wildcard expansion, command and variable substitution  

SYNOPSIS

eval command [argument ... ]  

DESCRIPTION

eval is a utility to execute any given command, after performing wildcard expansion, command substitution and variable substitution on the arguments before running the command. The command line is iteratively scanned for command substitutions in backquotes (`...`) and environment variables (%var), and the resulting text used as the argument list for the first argument (the command to be run). Command substitutions are usually performed by loading a shell, which allows for batch files, shell aliases and pipelines in addition to executable programs. If the first character of the command is '@', the command is exec'ed directly (much faster than loading a shell, but only works with exe and com files) The magic characters '%','`', and '@' are set by #defines in comsub.h so you can change them if you don't like them.

When substituting the output of commands, newlines are replaced by spaces. Arguments may need to be quoted in order that eval will see the % or `...` characters, depending on which shell you use. The 4DOS shell in particular needs to have backquotes protected by double quotes.  

DIAGNOSTICS

Diagnostics are printed for the following errors:
- out of memory
- command substitution failed (command not found, or line too long)
 

EXAMPLES

 

SEE ALSO

eval, incr, decr, expr  

BUGS

 

AUTHOR

Richard Brittain (richard@calvin.ee.cornell.edu)
 

Index

NAME
SYNOPSIS
DESCRIPTION
DIAGNOSTICS
EXAMPLES
SEE ALSO
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 04:28:05 GMT, March 28, 2025