lk/basics/eval.md
2024-04-07 11:52:24 +02:00

254 B

title tags
eval
basics

Compose a statement for execution.

x='echo $y'
echo $x
y=dragon
eval "$x"

The results remain in the current shell, unlike sub-shells.

b=basilisk
sh -c 'echo $b'
eval "g=goblin"
echo $g