Ruby interaction with command line

Ruby have a way to execute command line program using back tick. Enclosed our statement to be executed by command line using back tick.

Lets try using back tick on irb !

we can put the output to a variable to process it like sample below.

ls is a command to list content of your file system, if you wonder …

bye and good night …

Leave a Reply

Your email address will not be published. Required fields are marked *