Chapter 14. Scripting and System Administration

Thus spake the master programmer: “Though a program be but three lines long, someday it will have to be maintained.”

Geoffrey James, The Tao of Programming

Programmers often need to “glue” programs together with little scripts that talk to the operating system at a fairly high level and run external programs. This is especially true in the UNIX world, which daily relies on shell scripts for countless tasks.

Ruby is not always a convenient glue language because it is more general-purpose than that. But in the long run, anything that can be done in bash (or the others) can also be done in Ruby.

In many cases, you might just as well use one of the more traditional languages for this purpose. The ...

Get The Ruby Way: Solutions and Techniques in Ruby Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.