Reddit Reddit reviews The AWK Programming Language

We found 6 Reddit comments about The AWK Programming Language. Here are the top ones, ranked by their Reddit score.

Computers & Technology
Books
Computer Software
The AWK Programming Language
Check price on Amazon

6 Reddit comments about The AWK Programming Language:

u/yorugua · 1 pointr/linux

if you are going to be programming awk, you need to get the book on it from A, W and K. Once you get a grasp of how AWK processes files, I think you'll go clear from there.

One Book

u/TheAntiRudin · 1 pointr/linux

This is still the definitive work on the subject.

u/colemaker360 · 1 pointr/bash

If you're open to learning a little awk, it can handle this in a breeze with a one-liner:

awk '/^\s*$/{next}{arr[$1]++}END{for (a in arr) print a, arr[a]}' test.log

Breaking it down:

  • awk assumes space is the field delimiter. You can pass a different delimiter if you want.
  • /^\\s*$/{next} means if the line is empty, ignore it
  • {arr[$1]++} means make an array that holds your counts. `$1` means the first field
  • If you have a header line that you don't want to count, change it to NR>1{arr[$1]++}
  • END{for (a in arr) print a, arr[a]} means at the end of processing, loop through the array you made and print the results

    awk is super powerful, and a lost art. This book is a great read if you can pick up a used one.
u/phao · 1 pointr/learnprogramming

I've started with Unix for Poets. It's pretty good =)

http://web.stanford.edu/class/cs124/kwc-unix-for-poets.pdf

There are books on this. Like "The Unix Programming Environment" and "The AWK Programming Language", both books include Brian Kernighan as one of the authors, who is one of the creators of AWK and a UNIX wizard from its roots (no pun intended).