News for hackers. Stuff that matters.
Re:Awk As A Major Systems Programming Language, Revisited (2... by downerending on Tuesday February 11, 2020 @07:18PM (#22304450)
It has a great history, but the only thing I use it for anymore is splitting fields on whitespace, and that only because the 'cut' maintainers won't add this (tiny) feature.
Re:Awk As A Major Systems Programming Language, Revisited (2... by samatman on Tuesday February 11, 2020 @07:19PM (#22304457)
Fex is your new best friend!

https://www.semicomplete.com/projects/fex/

Re:Awk As A Major Systems Programming Language, Revisited (2... by yjftsjthsd-h on Tuesday February 11, 2020 @07:52PM (#22304667)
So this is nice, but it needs to be installed. It feels dumb to use awk just to grab fields, but it's everywhere by default with no effort, and it works.
Re:Awk As A Major Systems Programming Language, Revisited (2... by downerending on Tuesday February 11, 2020 @07:56PM (#22304690)
This is a real issue. In principle, we can often install whatever, but it takes years in the Linux world before one can assume that any given tool or feature is ubiquitous.

And even then, things can fall apart. Python2 made it, but now it's going away. (Yes, there is a Python3 often present, but neither is a substitute for the other.)

Re:Awk As A Major Systems Programming Language, Revisited (2... by lousyd on Tuesday February 11, 2020 @08:53PM (#22305025)
Ugh. Why braces ( { } )? That's the biggest tiny pain of using awk. It's an odd stretch for my fingers to type them and I have to look down to be sure I hit them right.
Re:Awk As A Major Systems Programming Language, Revisited (2... by adrianN on Wednesday February 12, 2020 @12:00AM (#22305939)
Use one of the many tools for customizing your keyboard layout. {} are Alt+J and Alt+K for me.
Re:Awk As A Major Systems Programming Language, Revisited (2... by samatman on Tuesday February 11, 2020 @10:21PM (#22305436)
braces are pretty well built into my muscle memory at this point, but I actually agree with you aesthetically, I would prefer square brackets `fex [1:3,5]`. I presume it's because of awk <shrug>

Great tool though