eval
Quick Reference
Command Name:
eval
Category:
shell builtin
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
- 1
Dynamic command execution
Execute commands constructed at runtime
- 2
Variable indirection
Access variables whose names are stored in other variables
- 3
Command output processing
Execute the output of a command as shell code
- 4
Complex command construction
Build and execute complex commands programmatically
Syntax
eval [arguments]
Options
Option | Description |
---|---|
eval doesn't accept options like standard commands. It simply evaluates its arguments as a command. |
Examples
How to Use These Examples
The examples below show common ways to use the eval
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.