Chapter 2. Common Tasks, Quick Solutions

Much of this book is devoted to writing "proper" code in nice little scripts and demonstrating how much easier Ruby makes this process. Even so, there will always be times when you just want to remove the commas from something or quickly rotate a log. Thus this relatively short chapter sits in deference to the needs of the ten-second script.

The bulk of the chapter uses one-liners to introduce the various command line flags, execution semantics, and variables available in the context of really quick scripting. For a more systematic overview of these entities, refer to the appendix.

One-liners

Did you hear the one about the priest and the oversized cucumber? No? Consider yourself very lucky.

In the previous ...

Get Practical Ruby for System Administration 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.