Awk’s codebase hit a record high at 37.6 M (up from 33.5 M) even as its contributor count dipped from 857 to 793. #Awk #github
@finner I invite you to share questions if you have 'em…some of us love #awk and enjoy a good challenge 😁
Dude. Wtf. I was just looking at the #awk guide and I now know like 0.00001% of awk and in like 2 seconds I just figured out how to do something I failed to do after more than an hour attempting with grep.
@finner everytime someone starts to learn #awk @bcantrill gets a diet coke

Coming to learn better the differences between #grep #awk and #sed.

Learning that my frustration with grep is that I misunderstood what its (at least base and intended) function is, and I've been trying to make it do things that are much more suited to things like sed and awk.

Time to learn some awk.

@finner

I"m a big fan and post about #awk frequently¹, blog about it occasionally², and hang out in r/awk too. The hashtag is also worth following if you aspire to use it more.

@barubary


¹ https://mastodon.bsd.cafe/search?q=awk+from%3Agumnos&type=statuses

² https://blog.thechases.com/categories/awk/

³ https://www.reddit.com/r/awk/

BSD.cafe Mastodon Portal

Welcome to the BSD Cafe! We're excited to serve you the best flavors of BSD, including FreeBSD, NetBSD, OpenBSD, and DragonflyBSD. But if you prefer Linux, you're welcome here too!

Mastodon hosted on bsd.cafe

@barubary @finner for an #awk version:

awk '/^\//{s=0}/wifi$/{s=1}s && $1=="Powered"{print $NF; exit}'

(if there's more than one wifi device and you want *all* of the Powered= values rather than just the first wifi device, you can remove the "; exit")

Sort lines in one text file by order of matching part in another file #commandline #grep #sed #awk #sort

https://askubuntu.com/q/1566983/612

Sort lines in one text file by order of matching part in another file

I have two text files, one with a list of sample names like this: 51234_SampleName 52345_SampleName 53456_SampleName 54567_SampleName And the other with the same names but truncated and in a

Ask Ubuntu

@finner Here's a solution using perl instead:

perl -wlne 'if (m{/wifi} ... m{^/}) { print $1 if /\bPowered = (\S+)/ }'

(Translation to awk is left as an exercise for the reader.)

#perl #awk

As a long time #Forth, #Lisp, #Lua, #Awk and #C programmer, I really shouldn't be having this much fun coding in #Oberon (#Oberon-07 to be specific).

It reminds of old school Forth (particularly Eforth): Here is a minimally viable program language (fully described in a handful of pages); don't get hung up on abstraction and libraries:... work on the problem.