Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/learnbyexample/learn_perl_oneliners

Example based guide for text processing with perl from the command line
https://github.com/learnbyexample/learn_perl_oneliners

command-line ebooks exercises learn-by-doing one-liners perl text-processing

Last synced: 2 months ago
JSON representation

Example based guide for text processing with perl from the command line

Awesome Lists containing this project

README

        

# Perl One-Liners Guide

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

Perl 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](./exercises/Exercises.md).

For solutions to the exercises, see [Exercise_solutions.md](./exercises/Exercise_solutions.md).

See [Version_changes.md](./Version_changes.md) to keep track of changes made to the book.


# E-book

* You can purchase the pdf/epub versions of the book using these links:
* https://learnbyexample.gumroad.com/l/perl-oneliners
* https://leanpub.com/perl-oneliners
* You can also get the book as part of these bundles:
* **All books bundle** bundle from https://learnbyexample.gumroad.com/l/all-books
* Includes all my programming books
* **Magical one-liners** bundle from https://learnbyexample.gumroad.com/l/oneliners or https://leanpub.com/b/oneliners
* See https://learnbyexample.github.io/books/ for a list of other books

For a preview of the book, see [sample chapters](./sample_chapters/perl_oneliners_sample.pdf).

The book can also be [viewed as a single markdown file in this repo](./perl_oneliners.md). See my blogpost on [generating pdfs from markdown using pandoc](https://learnbyexample.github.io/customizing-pandoc/) if you are interested in the ebook creation process.

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


# Testimonials

>This is fantastic! πŸ‘ I use Perl one-liners for record and text processing a lot and this will be definitely something I will keep coming back to - I’ve already learned a trick from β€œContext Matching” (9) πŸ™‚
>
> β€” [feedback on [email protected]](https://programming.dev/comment/3277968)


# 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:

* Issue Manager: [https://github.com/learnbyexample/learn_perl_oneliners/issues](https://github.com/learnbyexample/learn_perl_oneliners/issues)
* E-mail: `echo 'bGVhcm5ieWV4YW1wbGUubmV0QGdtYWlsLmNvbQo=' | base64 --decode`
* Twitter: [https://twitter.com/learn_byexample](https://twitter.com/learn_byexample)


# Table of Contents

1) Preface
2) One-liner introduction
3) Line processing
4) In-place file editing
5) Field separators
6) Record separators
7) Using modules
8) Multiple file input
9) Processing multiple records
10) Two file processing
11) Dealing with duplicates
12) Perl rename command


# Acknowledgements

* [Perl documentation](https://perldoc.perl.org/) β€” manuals, tutorials and examples
* [stackoverflow](https://stackoverflow.com/) and [unix.stackexchange](https://unix.stackexchange.com/) β€” for getting answers to pertinent questions on Perl and related commands
* [tex.stackexchange](https://tex.stackexchange.com/) β€” for help on [pandoc](https://github.com/jgm/pandoc/) and `tex` related questions
* [/r/perl/](https://old.reddit.com/r/perl/) β€” helpful forum
* [canva](https://www.canva.com/) β€” cover image
* [oxipng](https://github.com/shssoichiro/oxipng), [pngquant](https://pngquant.org/) and [svgcleaner](https://github.com/RazrFalcon/svgcleaner) β€” optimizing images
* [Warning](https://commons.wikimedia.org/wiki/File:Warning_icon.svg) and [Info](https://commons.wikimedia.org/wiki/File:Info_icon_002.svg) icons by [Amada44](https://commons.wikimedia.org/wiki/User:Amada44) under public domain
* [mdBook](https://github.com/rust-lang/mdBook) β€” for web version of the book
* [mdBook-pagetoc](https://github.com/JorelAli/mdBook-pagetoc) β€” for adding table of contents for each chapter
* [minify-html](https://github.com/wilsonzlin/minify-html) β€” for minifying html files

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](https://creativecommons.org/licenses/by-nc-sa/4.0/).

The code snippets are licensed under MIT, see [LICENSE](./LICENSE) file.