Wrapping Up

We looked now at how to use standard input to obtain input from users’ keyboards, how to redirect the output of other programs into our own, and how powerful text processing pipelines can be. We saw the value of small tools that perform a single task and how they can be composed together in different ways to perform complex text processing tasks. We learned how to write scripts that can be directly executed and that can process standard input as a stream and so can work with large quantities of input.

We used standard input so far from the perspective of scripts—simple ones, at times, but scripts nevertheless. Sometimes, though, we don’t want to have to go to the trouble of writing a full-fledged script to process some data. Wouldn’t ...

Get Text Processing with Ruby 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.