Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of The GNU Awk User's Guide

    The GNU Awk User's Guide

    Arnold Robbins · 1996

    ProgrammingSystems & OS
    Open LibraryAmazon
    Stats for nerds
    4recommend
    6mentions
    4people
    2014–2020years
    67% recommend33% neutral

    Mentions per year

    2014201520162017201820192020

    What Hacker News says

    1. dredmorbiusOct 2020
      GNU AWK User's Guide is reasonably succinct, while being fairly comprehensive.

      https://www.gnu.org/software/gawk/manual/gawk.html

      The manpage alone is quite useful, though lacks some useful details.

      The awk FAQ provides general background, including diffeerences between implementations:

      http://www.faqs.org/faqs/computer-lang/awk/faq/

      thread
    2. yesenadamFeb 2019
      Same as usual, read every book about it![0] and don't try to learn from the man page. I think the original book by A, W and K (the 2nd edition anyway) was best. Also Arnold Robbins' books Sed and Awk and Effective AWK Programming are great.

      The GNU Awk User's Guide[1] is amazingly detailed, but the new AWK has bloated a lot, has 1000 features where the older one had a few dozen, and those core ones should be learnt first. (But people still like programming with it, and kept asking for features..) Hmm I don't think I use any of the new features, maybe I should...

      But really, it's very simple, I can't thinking of anything that's been anything like as easy to learn, except maybe BASIC. With which AWK shares some similarities - the friendliness of it, the BEGIN and END..

      [1] http://www.gnu.org/software/gawk/manual/gawk.html

      [0] Or if there are too many, get names from lists of best books on a subject.

      thread
    3. legends2kJun 2018
      I've heard about _The Awk Programming Language_ but could get my hands only on _The GNU Awk User's Guide_ by Arnold Robbins, since it's available as Info pages on my Linux box. It's also free online

      https://www.gnu.org/software/gawk/manual/gawk.html

      It's a pretty good book which teaches you both techniques and the nitty-gritty. I recommend this.

      thread
    4. donatzskyJun 2014
      While somewhat specific to GAWK, the GNU Awk User's Guide is excellent.

      http://www.gnu.org/software/gawk/manual/gawk.html

      thread
    5. dredmorbiusMar 2020
      I've discovered page-oriented processing in awk, which is a godsend for parsing PDFs.

      See:

      https://news.ycombinator.com/item?id=22156456

      In the GNU Awk User's Guide:

      https://www.gnu.org/software/gawk/manual/html_node/Multiple-...

      Tracking column and field widths across page breaks is ... interesting, but more tractable.

      thread
    6. dredmorbiusJan 2020
      Not for awk:

          BEGIN {
              RS=""
              FS="\n"
          }
      
          {
              for( i=1; i<=NF; i++ ) {
              nfields = split($i, afields, ": ")
              if( nfields != 2 ) {printf( "Bad fields count: %s %s %s\n", NR, i, $i) | "/dev/stderr"; exit 1 )}
              field(afield[1]) = afield[2]
              }
          }
      
      (Untested, but should be generally accurate.)

      That parses records based on blank lines, into fields based on lines, splitting the fields into individual data recoreds based on ": " as a regex.

      For more, see the GNU Awk User's Guide:

      https://www.gnu.org/software/gawk/manual/html_node/Multiple-...

      thread

    Related

    Cover of Effective awk Programming
    2017–2026

    Effective awk Programming

    Arnold Robbins
    3 recommend · 7
    Cover of Sed & awk
    2011–2023

    Sed & awk

    Dale Dougherty
    3 recommend · 7
    Cover of Lions' Commentary on UNIX 6th edition with source code
    2010–2020

    Lions' Commentary on UNIX 6th edition with source code

    John Lions
    7 recommend · 19
    Cover of The AWK programming language
    2009–2026

    The AWK programming language

    Alfred V. Aho
    61 recommend · 117
    Cover of Code Complete
    2007–2026

    Code Complete

    Steve McConnell
    393 recommend · 894
    Cover of The art of UNIX programming
    2007–2026

    The art of UNIX programming

    Eric S. Raymond
    85 recommend · 238
    Cover of The UNIX programming environment
    2007–2026

    The UNIX programming environment

    Brian W. Kernighan
    86 recommend · 215
    Cover of Advanced programming in the Unix environment
    2008–2025

    Advanced programming in the Unix environment

    W. Richard Stevens
    100 recommend · 153