Before YAML, before JSON, there were null-terminated records. See how this simple, pragmatic technique greases the pipes between UNIX command-line tools---and how you can harness it in your Ruby one-liners!
Tag: command line

Episode #649
Input Record Separator
Ruby has a lot of tools for processing input line-by-line. But when you look a little closer, it turns out that these methods are for more than just lines of …

Episode #648
Output Record Separator
Did you know Ruby has a print method in addition to puts? Did you know it's for record-oriented output? Do you know how to control the formatting of records in …

Episode #645
Grep, Sort, Uniq
As we continue exploring Ruby one-liner alternatives to UNIX command-line operations, today we tackle a common case: a combination of grepping through multiple files, and collating the results.

Episode #644
Console Width
Have you ever wondered how to tailor Ruby console output to the specific size of the user's terminal? In this video you'll learn how, using the io/console standard library!

Episode #642
Line Ending Processing Mode
Want line terminators in input text to just Go Away? Ruby has a mode for that!

Episode #638
Ruby as a Filter
Learn how Ruby's -p flag along with a bunch of handy shortcuts can take a script's worth of text filtering and shrink it to a one-liner!