Search This Blog

Shell script: execute a string as command

eval is what we need:
string="echo \"Shell scripting is cool.\""
eval $string

No comments:

Post a Comment