Quote:
Originally posted by sirclif
if you have a string variable that is a command such as:
var="echo 'hello world'"
then you can execute the command represented by the string with exec
exec $var
|
You are right, but doing so never goes back to the script, I mean:
[CODE]
var="echo 'hello world'"
exec $var
echo bye world
[CODE]
Does not executes the 'echo bye world'. 'exec' does not fork, it replaces the shell with the command.