this post was submitted on 25 Aug 2023
118 points (97.6% liked)

Linux

48245 readers
450 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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

top 14 comments
sorted by: hot top controversial new old
[–] agressivelyPassive@feddit.de 20 points 1 year ago (1 children)

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 7 points 1 year ago (1 children)

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

[–] agressivelyPassive@feddit.de 5 points 1 year ago

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

[–] eager_eagle@lemmy.world 13 points 1 year ago (2 children)

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

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

[–] PlexSheep@feddit.de 3 points 1 year ago

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

[–] Jack3G@sh.itjust.works 9 points 1 year ago (1 children)

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

[–] winety 8 points 1 year ago (1 children)

I very much enjoyed Command line text processing with Coreutils. It helped me when I was writing my thesis, which basically consisted of several (quite long) pipelines. It would have been quite helpful if I’d known awk, so I’ll check this book out!

The web version looks very nice, but the PDF version feels a bit iffy (maybe a bit cheap?) to me — for example there are some bad pagebreaks (e.g. between pages 9 and 10 or pages 14 and 15). How do you create it? Perhaps you should get more hands-on with the typesetting. (I'm no expert on typography, but it would be a shame if your work was detracted from by the little imperfections that some people are sensitive to.)

[–] learnbyexample@programming.dev 4 points 1 year ago (1 children)

Thanks a lot for the feedback on Coreutils book! It's so nice to hear that it helped in your thesis.

Regarding the ebook versions, I use pandoc to convert GitHub style Markdown to PDF/EPUB (wrote a blog post about my process here: https://learnbyexample.github.io/customizing-pandoc/). I had to search through stackexchange threads to customize the few things I could. I don't know how to fix the kind of page breaks you mentioned. But, I'll try to find a solution. Thanks again for the feedback :)

[–] winety 2 points 1 year ago

I can't imagine writing a whole book in Markdown. I couldn't live without the ability to create my own macros (like I can in TeX). But I digress. Those bad page breaks could perhaps be solved by using the nowidow (or any similar) package. If that doesn't work, manually put \pagebreak or \newpage before the offending lines.

Keep up the good work! :-)

[–] Certainity45@lemmy.ml 1 points 1 year ago (2 children)

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

[–] AProfessional@lemmy.world 3 points 1 year ago

sed is very simple, why?

[–] winety 1 points 1 year ago

At least sed works with Unicode. Some core utilities do not (looking at you, tr).