in reply to Execute commands in a string

Did you consider the use of eval?

But be aware of the security risks eval can bring.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law