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 Sed & awk

    Sed & awk

    Dale Dougherty, Arnold Robbins · 1990

    sed & awk describes two text processing programs that are mainstays of the UNIX programmer's toolbox.sed is a "stream editor" for editing streams of text that might be too large to edit as a single file, or that might be generated on the fly as part of a larger data processing step. The most common operation done with sed is substitution, replacing one block of text with another.awk is a complete programming language. Unlike many conventional languages, awk is "data driven" -- you specify what kind of data you are interested in and the operations to be performed when that data is found. awk does many things for you, including automatically opening and closing data files, reading records, breaking the records up into fields, and counting the records. While awk provides the features of most conventional programming languages, it also includes some unconventional features, such as extended regular expression matching and associative arrays. sed & awk describes both programs in detail and includes a chapter of example sed and awk scripts.This edition covers features of sed and awk that are mandated by the POSIX standard. This most notably affects awk, where POSIX standardized a new variable, CONVFMT, and new functions, toupper() and tolower(). The CONVFMT variable specifies the conversion format to use when converting numbers to strings (awk used to use OFMT for this purpose).

    Systems & OS
    Open LibraryAmazon
    Stats for nerds
    3recommend
    7mentions
    6people
    2011–2023years
    57% recommend43% neutral

    Mentions per year

    2011201320152017201920212023

    What Hacker News says

    1. yesenadamSep 2019
      A copy:

      http://gen.lib.rus.ec/book/index.php?md5=0AD0779BF3602F1EA22...

      Also Arnold Robbins' books Sed and Awk and Effective Awk Programming are excellent, and also detail the many features added since the latest edition of The AWK Programming Language (1988).

      http://gen.lib.rus.ec/search.php?&req=awk+robbins&sort=year&...

      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. hudibrasJun 2014
      The O'Reilly Sed & Awk book is a lot of fun, too.

      http://shop.oreilly.com/product/9781565922259.do

      thread
    4. dredmorbiusJun 2014
      UNIX Power Tools by O'Reilly is a text I strongly recommend for this. It's a sort of hardcopy hypertext narrative through a number of command-line and terminal-focused tools.

      Parts of it are dated now (it's ... gasp, 22 years since its first edition), but since it's one of those books based on UNIX philosophy it's aged quite well.

      It, Linux in a Nutshell, the Sed & AWK book, are still a pretty good introduction.

      http://www.powells.com/biblio/61-9780596003302-0

      thread
    5. cpifMay 2023
      My introduction to roff and co. as a typesetting system was the 1997 edition of Dale Dougherty and Arnold Robbins's Sed & Awk. Many of the book's examples are geared toward automatically inserting/correcting roff macros. I can't recall a specific example from the book, but it would be something like "insert the roff 'section' macro on matches of `/^CHAPTER/`."

      Ultimately, it's probably not practical, but I liked the idea of using UNIX utilities to get around worrying about markup altogether during the writing process. The book isn't really about roff, so I only got a sideways view of this kind of workflow. Was this "a thing" in the 90s?

      thread
    6. stanfieldechoFeb 2019
      I'm juggling several books currently:

      1. Computer Networking: A Top-Down Approach 6th Edition. 2. TCP/IP Illustrated, Vol. 1 2nd Edition. 3. Interconnections: Bridges, Routers, Switches, and Internetworking Protocols 2nd Edition. 4. Engineering a Compiler 2nd Edition. 5. Flex & Bison. 6. Sed & Awk. 7. K & R. 8. The Unix Programming Environment. 9. Advanced Programming in the UNIX Environment. 10. Linux Kernel Development. 11. The Go Programming Language. 12. Introduction to Operating Systems Abstractions.

      I recently discovered how much easier it is to use markdown for basic note taking, I have been just using html, which is part of the reason I took a break from reading, ha.

      thread

    Related

    Cover of Effective awk Programming
    2017–2026

    Effective awk Programming

    Arnold Robbins
    3 recommend · 7
    Cover of The GNU Awk User's Guide
    2014–2020

    The GNU Awk User's Guide

    Arnold Robbins
    4 recommend · 6
    Cover of The AWK programming language
    2009–2026

    The AWK programming language

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

    Algorithms

    Robert Sedgewick
    50 recommend · 100
    Cover of Code Complete
    2007–2026

    Code Complete

    Steve McConnell
    393 recommend · 894
    Cover of Unix text processing
    2012–2026

    Unix text processing

    Dale Dougherty
    6 recommend · 17
    Cover of Clean Code
    2008–2026

    Clean Code

    Robert C. Martin
    298 recommend · 951
    Cover of Advanced programming in the Unix environment
    2008–2025

    Advanced programming in the Unix environment

    W. Richard Stevens
    100 recommend · 153