Say I have the code:
print(">>> ")
command = gets
What I want to do, is execute the command
variable as one would normally do in Ruby, by putting backticks around the code you want to execute. How would I do this? If I do:
`command`
it just tries to execute the word command. How do I execute the variable???
Just interpolate it like you would with a string:
`#{command}`
rm -rf /
", your system will go bye-bye really fast - the Tin Man 2012-04-03 21:55