learnbyexample.github.io

bahmanm, to linux in Perl One-Liners Guide with plenty of examples and exercises
@bahmanm@lemmy.ml avatar

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

learnbyexample,
@learnbyexample@programming.dev avatar

That’s great to hear and thanks for the kind feedback :)

palordrolap, to linux in Learn GNU awk with hundreds of examples and exercises

NB: awk + sed + shell is approximately Perl.

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

learnbyexample,
@learnbyexample@programming.dev avatar

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

eager_eagle, to linux in Learn GNU awk with hundreds of examples and exercises
@eager_eagle@lemmy.world avatar

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

learnbyexample,
@learnbyexample@programming.dev avatar

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

PlexSheep,
@PlexSheep@feddit.de avatar

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

agressivelyPassive, to linux in Learn GNU awk with hundreds of examples and exercises

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,

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

agressivelyPassive,

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

winety, to linux in Learn GNU awk with hundreds of examples and exercises
@winety@communick.news avatar

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,
@learnbyexample@programming.dev avatar

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: 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,
@winety@communick.news avatar

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 https://tex.stackexchange.com/q/736 before the offending lines.

Keep up the good work! :-)

Certainity45, to linux in Learn GNU awk with hundreds of examples and exercises

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

AProfessional,

sed is very simple, why?

chayleaf,

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

Jack3G, to linux in Learn GNU awk with hundreds of examples and exercises
@Jack3G@sh.itjust.works avatar

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,
@learnbyexample@programming.dev avatar

Hope you find the book useful :)

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

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines