Jump to content

Shell Programming/eval command

From Wikibooks, open books for an open world

The eval command is like an extra $ in shell scripting. It evaluates a string and attempts to expand it as a variable. For example the following evaluates the string as $horse and expands the value of variable horse.

  eval $"horse"