Command line text processing with GNU Coreutils
You might be already aware of popular coreutils commands like head
, tail
, tr
, sort
, etc. This book will teach you more than twenty of such specialized text processing tools provided by the GNU coreutils
package.
My Command Line Text Processing repo includes chapters on some of these coreutils commands. Those chapters have been significantly edited for this book and new chapters have been added to cover more commands.
See Version_changes.md to keep track of changes made to the book.
E-book
You can purchase the book using these links:
- https://learnbyexample.gumroad.com/l/cli_coreutils
- https://leanpub.com/cli_coreutils
- You can also get the book as part of All books bundle from https://learnbyexample.gumroad.com/l/all-books
- See https://learnbyexample.github.io/books/ for list of other books
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 pdf/epub from markdown using pandoc if you are interested in the ebook creation process.
For web version of the book, visit https://learnbyexample.github.io/cli_text_processing_coreutils/
Testimonials
In my opinion the book does a great job of quickly presenting examples of how commands can be used and then paired up to achieve new or interesting ways of manipulating data. Throughout the text there are little highlights offering tips on extra functionality or limitations of certain commands. For instance, when discussing the shuf command we're warned that shuf will not work with multiple files. However, we can merge multiple files together (using the cat command) and then pass them to shuf. These little gems of wisdom add a dimension to the book and will likely save the reader some time wondering why their scripts are not working as expected.
â book review by Jesse Smith on distrowatch.com
Feedback and Contributing
Open an issue if you spot any typo/errors.
I'd also highly appreciate your feedback about the book.
Twitter: https://twitter.com/learn_byexample
Table of Contents
- Preface
- Introduction
- cat and tac
- head and tail
- tr
- cut
- seq
- shuf
- paste
- pr
- fold and fmt
- sort
- uniq
- comm
- join
- nl
- wc
- split
- csplit
- expand and unexpand
- basename and dirname
- What next?
Acknowledgements
- /r/commandline/, /r/linux4noobs/ and /r/linux/ â helpful forums
- stackoverflow and unix.stackexchange â for getting answers on pertinent questions related to cli tools
- tex.stackexchange â for help on pandoc and
tex
related questions - canva â cover image
- Warning and Info icons by Amada44 under public domain
- pngquant and svgcleaner for optimizing images
- Inkscape for favicon
- mdBook â for web version of the book
- mdBook-pagetoc â for adding table of contents for each page
- minify-html â for minifying html files
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