You might be already aware of popular coreutils commands like head
, tail
, tr
, sort
and so on. This book will teach you more than twenty of such specialized text processing tools provided by the GNU coreutils
package. Visit https://youtu.be/oCnJLu_PUbY for a short video about the book.
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.
- You can purchase the pdf/epub versions of the book using these links:
- You can also get the book as part of these bundles:
- Linux CLI Text Processing bundle from https://learnbyexample.gumroad.com/l/linux-cli-text-processing or https://leanpub.com/b/linux-cli-text-processing
- All books bundle bundle from https://learnbyexample.gumroad.com/l/all-books
- Includes all my programming books
- See https://learnbyexample.github.io/books/ for a 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 pdfs 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/
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
I discovered your books recently and they’re awesome, thank you! As a 20 year *nix they made me realize how much more there are to these rock solid and ancient tools, once you spend the time to actually learn the intricacies of them.
— feedback on reddit
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:
- Issue Manager: https://github.com/learnbyexample/cli_text_processing_coreutils/issues
- E-mail:
echo 'bGVhcm5ieWV4YW1wbGUubmV0QGdtYWlsLmNvbQo=' | base64 --decode
- Twitter: https://twitter.com/learn_byexample
- 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?
- GNU coreutils documentation — manual and examples
- /r/commandline/, /r/linux4noobs/ and /r/linux/ — helpful forums
- stackoverflow and unix.stackexchange — for getting answers to pertinent questions on coreutils and related commands
- tex.stackexchange — for help on pandoc and
tex
related questions - canva — cover image
- Warning and Info icons by Amada44 under public domain
- oxipng, pngquant and svgcleaner — optimizing images
- SpikePy — for spotting an ambiguous explanation
- mdBook — for web version of the book
- mdBook-pagetoc — for adding table of contents for each page
- minify-html — for minifying html files
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.