Skip to content

learnbyexample/learn_ruby_oneliners

Repository files navigation

Ruby One-Liners Guide

Example based guide for text processing with Ruby from the command line. Visit https://youtu.be/nsWVepZruws for a short video about the book.

Ruby One-Liners Guide ebook cover image

The book also includes exercises to test your understanding, which are presented together as a single file in this repo — Exercises.md.

For solutions to the exercises, see Exercise_solutions.md.

See Version_changes.md to keep track of changes made to the book.


E-book

For a preview of the book, see sample chapters.

The book can also be viewed as a single markdown file in this repo. See my blogpost on generating pdfs from markdown using pandoc if you are interested in the ebook creation process.

For the web version of the book, visit https://learnbyexample.github.io/learn_ruby_oneliners/


Testimonials

This Ruby one-liners cookbook is incredible. Pretty mind boggling all the stuff you can do.

feedback on twitter


Feedback

⚠️ ⚠️ Please DO NOT submit pull requests. Main reason being any modification requires changes in multiple places.

I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on. Reader feedback is essential and especially so for self-published authors.

You can reach me via:


Table of Contents

  1. Preface
  2. One-liner introduction
  3. Line processing
  4. Field separators
  5. Record separators
  6. Multiple file input
  7. Processing multiple records
  8. Two file processing
  9. Dealing with duplicates
  10. Processing structured data

Acknowledgements

A heartfelt thanks to all my readers. Your valuable support has significantly eased my financial concerns and allows me to continue working on programming ebooks.


License

The book is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

The code snippets are licensed under MIT, see LICENSE file.