linux eval command code example
Example 1: linux eval
~$ CD="cd Desktop"
~$ eval $CD # Implements the command in a string ( $ eval "cd Desktop")
~/Desktop$
Example 2: eval function in unix
eval [arg ...]
The args are read and concatenated together into a single com-
mand. This command is then read and executed by the shell, and
its exit status is returned as the value of eval. If there are
no args, or only null arguments, eval returns 0.