Bash - eval (Execute its argument)

> Procedural Languages > Bash Shell and (Unix|Linux) Utilities (XCU)

1 - About

eval is a bash builtin command that executes command by concatenating arguments.

Advertising

3 - Syntax

eval [arg ...]
  • The args are read and concatenated together into a single command, separating each with a <space>.
  • This command is then read and executed by the shell

4 - Return

It exit status is returned as the value of eval. If there are no args, or only null arguments, eval returns 0.

5 - Documentation / Reference