Command eval
Name
eval Evaluates its arguments as a command and executes itSynopsis
eval [cmd]
The eval command parses its arguments, concatenates them with spaces then passes the resultant string to the current Shell for evaluation and execution. This command can be used to dynamically construct and execute commands.
Examples
Example
A="echo foo" eval $A
Result
foo
Example storing the result in a variable
width=$(eval 'identify -format \"%[fx:w]\" dir1/picture.jpg')
Result
$ echo ${width} "592"
Commands
CategoryCommands