News for hackers. Stuff that matters.
Re:Why Learn Awk? (2016) by geocrasher on Tuesday January 21, 2020 @01:23PM (#22109764)
My favorite Awk reference is this:

https://ferd.ca/awk-in-20-minutes.html

Also, a handy trick is to combine awk and cut. For example I had a log line that had a variable amount of columns just in one field, but immediately after the field was a comma. I cut based on the comma:

cut -d, -f1,2

and then awk'd the last column:

cut -d, -f1,2 | awk '{ print $2" "$5" "$NF }'

So, sometimes awk and cut can help each other.

Re:Why Learn Awk? (2016) by _slyo on Tuesday January 21, 2020 @06:05PM (#22112735)
I've been procrastinating learning awk for a while now. Thanks for this, I read it and it's just what I needed.