I am trying to dynamically generate commands as strings
and then execute them in Ruby and collect the output.
However Ruby treats the specified command literally,
so if I build a command with

command = "echo test"
result = `command`

the result is
command not found: command

I've got around this by calling Kernel.`(command),
is there a different/better way?

Thanks in advance

Brian