mboelen, to linux
@mboelen@mastodon.social avatar

I'm working on a cheat sheet for #AWK. This nifty tool is easily overlooked, but so powerful that it really made me invest more time into learning it.

The initial version of the cheat sheet is available and ready for feedback: https://linux-audit.com/cheat-sheets/awk/

Boosts would be appreciated, and feedback even more!

What are your AWK one-liners that others really need to know and should be included?

Special thanks to @DopeGhoti

#linux #sysadmin #automation #shell

ncrav,
@ncrav@mas.to avatar

@mboelen @DopeGhoti Nice work! Always trying to have something I can use to teach newcomers, which in my case are too much spark oriented these days and forget tiny little awk can handle quite a lot 😅

juandesant, to random
@juandesant@astrodon.social avatar

I tend to follow the logic of awk better than the one of sed (not being a vi enthusiast), but it is good to see when one might be better than the other:

https://www.linuxjournal.com/content/text-manipulation-linux-awk-vs-sed

sergio_101, to ChatGPT

for like more than 30 years, i have kinda skirted writing serious #ShellScripts, getting good with #awk and #sed , and getting really good with #LaTeX because it usually meant a TON of digging through old documentation and piecing things together. Recently, i just started asking #chatgpt things like:

How do I flip through a directory of a bazillion zip files, uncompress each one, put the contents on my NAS, and then move those zip files somewhere else for safekeeping?

and learn from the answer

awb, to linux

Another interesting AWK feature(?) that is likely little known is that there can be any number of BEGIN and END patterns and they can be anywhere in the AWK program. Their statements are concatenated into one action at run-time.

This makes me wonder, has anybody a) ever seen this used in production code and b) why?
#awk #unix #linux

milosz,

@awb This is intresting. It never occurred to me to use it multiple times.

mjgardner, to programming
@mjgardner@social.sdf.org avatar

@Perl Happy 36th #birthday to the #Perl #programming language!

v1.0 then:
“Perl is kind of designed to make #awk and #sed semi-obsolete […] The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).” https://github.com/Perl/perl5/releases/tag/perl-1.0

v5.38.2 now:
“Perl is […] now used for a wide range of tasks including #SysAdmin, #WebDev, network programming, #GUI development, and more.” https://perldoc.perl.org/perlintro#What-is-Perl%3F

dragonsidedd,
@dragonsidedd@sciencemastodon.com avatar

@mjgardner @Perl I remember first encountering Perl as Perl3, just before Perl4 and the Camel book. I remember looking at the crazy sigils and deciding, "this is it, the first new language I don't bother to learn."

6 months later, I had learned.

30+ years later, the majority of my working life continues to be spent manipulating those sigils. @rrays and $calars and h%shes FTW!

sjfloat,

@mjgardner @Perl For me, it did replace awk and sed. Not to mention a goodly portion of the C and Bourne shell I was then writing.

awb, to linux

AWK was designed to harmoniously integrate with the Shell and follow the Unix philosophy. Perl and to some degree Ruby offer that as well. The ease with which a single line AWK script can be integrated in a Shell pipeline is what keeps it alive. Python very much does not offer that, Python scripts are standalone programs.

What other languages are out there that can do something as simple as 'print $2' in a Shell pipeline? jq comes to mind.
#linux #unix #shell #awk #perl #ruby #python

kittylyst,
@kittylyst@mastodon.social avatar

@awb I think we're on the same page about this one!

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

@kittylyst @awb It’s nice to have #Perll that can do both

tivasyk, to Bash
@tivasyk@mastodon.social avatar

through all of my sysadmin experience i've been using #sed and avoiding #awk… for some reason. scratch that: for no good reason.

awk is to sed what python is to brainfuck.

the awk programs are a lot more easy to compose and modify, flexible and readable. and there's a brilliant book by the authors — now awailable for a free read from archive.org!

in retrospect, i can't see any tasks that i should have done with sed instead of #bash / awk.

ljrk, to random
@ljrk@todon.eu avatar

Finally my #AWK Programming Language, 2nd Ed., is arriving <3

SeaGL, to random
@SeaGL@mastodon.social avatar

Talk announcement for #SeaGL2023
@FLOX_advocate presents: "Advanced jq: awk for JSON".
Details: https://osem.seagl.org/conferences/seagl2023/program/proposals/950
#SeaGL #awk #json

jartigag, to random
@jartigag@mastodon.social avatar

#AWK magic 😇

video/mp4

root42, to random
@root42@chaos.social avatar

The new #awk programming manual is out!

raineer, to programming

Just let me be the latest to brag about getting my copy of the 2nd edition of The Awk Programming Language

:blob_nerdy:

This book is just wonderful

#awk #programming

https://bookshop.org/p/books/the-awk-programming-language-brian-kernighan/20334738?ean=9780138269722

william_shotts, to Amazon
@william_shotts@mstdn.social avatar

So... I pre-ordered the new second edition of The AWK Programming Language and it arrived today. The packaging demonstrated Amazon's keen awareness of talking a good game and failing to follow through.
#Amazon #AWK #Linux #Books

View inside the box showing a small thin book resting in the bottom of a vastly over-sized box.

jmcastagnetto, to random
@jmcastagnetto@mastodon.social avatar

Today's @hrbrmstr drop mentions one my favorite CLI languages: , back in the mid to late 1990s it was my workhorse for processing data from molecular dynamics simulations, protein structures and other crazy stuff like that 🙂

See: https://mastodon.social/@hrbrmstr/111046565445854504

tcltk, to tcl

(also known as Tool Command Language; pronounced as either "tickle" or as an initialism) is a high-level, general-purpose, interpreted, dynamic programming language.

It was made in 1988 by John Ousterhout and it was inspired mainly by #C, , , and has served as one of the inspirations of and due to its simplicity and elegance.

(1/🧵)

tcltk,

Tcl was designed and "born out of frustration" because John Ousterhout wanted a better language for (and especially the tool Magic). Tcl to this day has a strong foothold in EDA. Tcl was made to be easily embeddable in #C for rapid prototyping, scripted applications, GUIs, and testing. You can find Tcl implementations for almost every operating system and due to it being lightweight it can be also seen in embedded development.

(2/🧵)

tcltk,

is used by large corporations in the sphere such as (now ) with their Vivado IDE, as well , Cadence, and . Tcl is also trusted by , , , , , , , and other companies invested in the and business.

(4/🧵)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • tester
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • tacticalgear
  • ethstaker
  • rosin
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • Durango
  • DreamBathrooms
  • megavids
  • ngwrru68w68
  • normalnudes
  • cisconetworking
  • Leos
  • love
  • cubers
  • osvaldo12
  • mdbf
  • anitta
  • provamag3
  • modclub
  • GTA5RPClips
  • JUstTest
  • All magazines