Learn GNU awk with hundreds of examples and exercises (learnbyexample.github.io)
from learnbyexample@programming.dev to linux@lemmy.ml on 25 Aug 2023 11:11
https://programming.dev/post/2128595

Hello!

I am pleased to announce a new version of my “CLI text processing with GNU awk” ebook.

Learn the GNU awk command step-by-step from beginner to advanced levels with hundreds of examples and exercises. This book will dive deep into field processing, show examples for filtering features, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on. Regular Expressions will also be discussed in detail.

Links:

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.

Happy learning :)

#linux

threaded - newest

Jack3G@sh.itjust.works on 25 Aug 2023 11:53 next collapse

I just told myself earlier today that I should learn how to actually use awk, rather that copying from the internet. Thanks for this!

learnbyexample@programming.dev on 25 Aug 2023 12:42 collapse

Hope you find the book useful :)

I’d also suggest these shorter guides to get started:

Certainity45@lemmy.ml on 25 Aug 2023 12:47 next collapse

IMHO awk should be more popular than it is. Sed should be excluded from core-utils.

AProfessional@lemmy.world on 25 Aug 2023 13:30 next collapse

sed is very simple, why?

chayleaf@lemmy.ml on 25 Aug 2023 17:27 collapse

you will pry my s/a/b/ from my cold dead hands!

agressivelyPassive@feddit.de on 25 Aug 2023 13:08 next collapse

Two weeks after using awk the first time for real, I noticed the first grey hair in my beard.

Could be coincidence, but I think we all know it’s not.

QuazarOmega@lemy.lol on 25 Aug 2023 14:41 collapse

Soon enough your hair will fall out too, such is the destiny of a wizard

agressivelyPassive@feddit.de on 25 Aug 2023 16:51 collapse

No! It can’t be! I’m not ready!

eager_eagle@lemmy.world on 25 Aug 2023 14:24 next collapse

so we can actually learn it? I thought it was like regex: we copy an example from stack overflow and cross our fingers.

learnbyexample@programming.dev on 25 Aug 2023 15:04 next collapse

I’ve written books on regex too, if you are interested in learning ;)

PlexSheep@feddit.de on 26 Aug 2023 19:26 collapse

I have learned Regen, it’s not that hard actually. My recommendation: regex101.com

palordrolap@kbin.social on 25 Aug 2023 17:45 next collapse

NB: awk + sed + shell is approximately Perl.

You are on a slippery slope. Which you might enjoy tbh. Good luck either way.

learnbyexample@programming.dev on 26 Aug 2023 03:55 collapse

I have a book for Perl One-Liners as well, which I’m currently revising :)

[deleted] on 25 Aug 2023 17:45 collapse

.