this post was submitted on 16 Dec 2025
44 points (94.0% liked)

Linux

11045 readers
405 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] vk6flab@lemmy.radio 10 points 3 weeks ago (18 children)
[–] victorz@lemmy.world 4 points 3 weeks ago* (last edited 3 weeks ago) (17 children)

What do y'all use awk for really? 20 of using Linux, I've never had to use awk. And I've done a looot of scripting in my days. Anything from building my own clone of polybar using eww (with loads of scripts underneath), to automated systems for bulk handling of student assignments back at uni when I used to help out with grading and such.

What's awk good for that other standard utilities can't do?

[–] stewie410@programming.dev 3 points 3 weeks ago (1 children)

I both love and hate awk -- on the one hand, it provides the same/similar functionality of similar tools (sed, grep, cut, etc); but it is a bit of a bear and can be pretty slow.

If you need more "complex" tasks done what would be cumbersome with the rest of the standard tooling, and performance is a non-issue, awk/gawk can probably get it done.

Though, I too am trying to use it as little as possible in scripts. I think multiple subshells/pipes is still better than awk in some cases. Syntax also leaves a lot to be desired...

[–] victorz@lemmy.world 2 points 3 weeks ago (1 children)

My experience exactly. I'd rather use a specific tool designed for the task than invoke a whole new language. It just feels... icky for some reason.

[–] stewie410@programming.dev 2 points 3 weeks ago

There are times when dealing with annoying field separators that awk is a more convenient tool -- though, I'm also now at the stage that I want to do as much with bash-builtins as I possibly can.

load more comments (15 replies)
load more comments (15 replies)