Appendix A. Ruby Execution

As promised in Chapter 2, this appendix takes time to introduce the general execution environment of a Ruby script. It covers the various command line options available with the Ruby interpreter as well as the many pertinent variables and constants that make very short scripts possible.

Command Line Options

Perl users should feel right at home with many of the flags that can be passed to the Ruby interpreter, as the flags were modeled very much on those used by Perl. It is my opinion that Perl's biggest strength lies in its one-liners that, while often baffling to the newcomer, provide immense power to construct unbelievably dense code. This facility stems from two things: command line modes that do very common things ...

Get Practical Ruby for System Administration now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.