From: Angel Alonso Date: 2008-09-11T03:27:00+09:00 Subject: Re: How to execute files or commands in ruby? ------=_Part_14341_12254533.1221071611977 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/9/10 Vazquez, Eduardo > Overkill I know > > ***BEGIN SCRIPT*** > > class Example > def hostname > puts `hostname` > end > > def date > puts `date` > end > > def message > puts `echo 'just put you command between the tick marks'` > end > end > > e = Example.new > e.hostname > e.date > e.message > > ***END SCRIPT*** > > > > -----Original Message----- > From: F3leR F3leR [mailto:f3ler0x69@gmail.com] > Sent: Wednesday, September 10, 2008 1:51 PM > To: ruby-talk ML > Subject: How to execute files or commands in ruby? > > Hi! > This is mi first message i'm new and i'm spanish if you are spanish > please > contact me. > > My question is: > > How I can execute files or commands in the system? > > Thanks for reading and have a nice day! > "NOTICE: This email message is for the sole use of the intended > recipient(s) and may contain confidential and privileged information. Any > unauthorized review, use, disclosure or distribution is prohibited. If you > are not the intended recipient, please contact the sender by reply email and > destroy all copies of the original message." > > That don't work for me. Only print in the screen the command. But I found the solution: exec 'the command' Have a nice day ;) -- Angel Alonso F3leR ------=_Part_14341_12254533.1221071611977--