I wonder if anyone knows how to run Unix/Linux commands from Ruby?
I understand that the Perl counterpart could be sth like the
following.
-
First I create a perl file example.pl
-
Then inside the file I have the desired Linux commands.
#!/usr/local/bin/perl -w
ls -l
;
curl google.com
;
- When I run the file, those Linux commands would be executed.
Just wonder how I can do this in Ruby in Linux environment. Thanks a
lot!