Cider - Shop now
Buy new:
-55% $22.33
FREE delivery Thursday, May 15 to Nashville 37217 on orders shipped by Amazon over $35
Ships from: Amazon.com
Sold by: Amazon.com
$22.33 with 55 percent savings
List Price: $49.99
Get Fast, Free Shipping with Amazon Prime FREE Returns
FREE delivery Thursday, May 15 to Nashville 37217 on orders shipped by Amazon over $35
Or Prime members get FREE delivery Monday, May 12.
Only 4 left in stock (more on the way).
$$22.33 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$22.33
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Ships from
Amazon.com
Amazon.com
Ships from
Amazon.com
Sold by
Amazon.com
Amazon.com
Sold by
Amazon.com
Returns
30-day refund/replacement
30-day refund/replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
$9.83
Get Fast, Free Shipping with Amazon Prime FREE Returns
FREE delivery Thursday, May 15 to Nashville 37217 on orders shipped by Amazon over $35
Or Prime members get FREE delivery Tuesday, May 13. Order within 6 hrs 38 mins.
Only 2 left in stock - order soon.
$$22.33 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$22.33
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Access codes and supplements are not guaranteed with used items.
$0.00
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

sed & awk: UNIX Power Tools 2nd Edition

4.6 out of 5 stars 207 ratings

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). The toupper() and tolower() functions each take a (presumably mixed case) string argument and return a new version of the string with all letters translated to the corresponding case. In addition, this edition covers GNU sed, newly available since the first edition. It also updates the first edition coverage of Bell Labs nawk and GNU awk (gawk), covers mawk, an additional freely available implementation of awk, and briefly discusses three commercial versions of awk, MKS awk, Thompson Automation awk (tawk), and Videosoft (VSAwk).

Frequently bought together

This item: sed & awk: UNIX Power Tools
$22.33
Get it as soon as Thursday, May 15
Only 4 left in stock (more on the way).
Ships from and sold by Amazon.com.
+
$24.99
Get it as soon as Thursday, May 15
In Stock
Ships from and sold by Amazon.com.
+
$15.99
Get it as soon as Saturday, May 17
Only 2 left in stock (more on the way).
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Some of these items ship sooner than the others.
Choose items to buy together.

From the brand

Editorial Reviews

From the Publisher

sed & awk, one of the most popular books in O'Reilly & Associates' Nutshell series, 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 new edition covers features of sed and awk that are now 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). The toupper() and tolower() functions each take a (presumably mixed case) string argument and return a new version of the string with all letters translated to the corresponding case. In addition, this edition covers GNU sed, newly available since the first edition. It also updates the first edition coverage of Bell Labs nawk and GNU awk (gawk), covers mawk, an additional freely available implementation of awk, and briefly discusses three commercial versions of awk, MKS awk, Thompson Automation awk (tawk), and Videosoft (VSAwk).

From the Back Cover

The book begins with an overview and a tutorial that demonstrate a progression in functionality from grep to sed to awk. sed and awk share a similar command-line syntax, accepting user instructions in the form of a script. Because all three programs use UNIX regular expressions, an entire chapter is devoted to understanding UNIX regular expression syntax. Next, the book describes how to write sed scripts. After getting started by writing a few simple scripts, you'll learn other basic commands that parallel manual editing actions, as well as advanced commands that introduce simple programming constructs. Among the advanced commands are those that manipulate the hold space, a set-aside temporary buffer. The second part of the book has been extensively revised to include POSIX awk as well as coverage of three freely available and three commercial versions of awk. The book introduces the primary features of the awk language and how to write simple scripts. You'll also learn: common programming constructs; how to use awk's built-in functions; how to write user-defined functions; debugging techniques for awk programs; how to develop an application that processes an index, demonstrating much of the power of awk; and FTP and contact information for obtaining various versions of awk. Also included is a miscellany of user-contributed scripts that demonstrate a wide range of sed and awk scripting styles and techniques.|The book begins with an overview and a tutorial that demonstrate a progression in functionality from grep to sed to awk. sed and awk share a similar command-line syntax, accepting user instructions in the form of a script. Because all three programs use UNIX regular expressions, an entire chapter is devoted to understanding UNIX regular expression syntax. Next, the book describes how to write sed scripts. After getting started by writing a few simple scripts, you'll learn other basic commands that parallel manual editing actions, as well as advanced commands that introduce simple programming constructs. Among the advanced commands are those that manipulate the hold space, a set-aside temporary buffer. The second part of the book has been extensively revised to include POSIX awk as well as coverage of three freely available and three commercial versions of awk. The book introduces the primary features of the awk language and how to write simple scripts. You'll also learn: common programming constructs; how to use awk's built-in functions; how to write user-defined functions; debugging techniques for awk programs; how to develop an application that processes an index, demonstrating much of the power of awk; and FTP and contact information for obtaining various versions of awk. Also included is a miscellany of user-contributed scripts that demonstrate a wide range of sed and awk scripting styles and techniques.

Product details

  • ASIN ‏ : ‎ 1565922255
  • Publisher ‏ : ‎ O'Reilly Media; 2nd edition (April 8, 1997)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 432 pages
  • ISBN-10 ‏ : ‎ 9781565922259
  • ISBN-13 ‏ : ‎ 978-1565922259
  • Item Weight ‏ : ‎ 1.3 pounds
  • Dimensions ‏ : ‎ 7 x 1 x 9.19 inches
  • Customer Reviews:
    4.6 out of 5 stars 207 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
Dale Dougherty
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Discover more of the author’s books, see similar authors, read book recommendations and more.

Customer reviews

4.6 out of 5 stars
207 global ratings

Review this product

Share your thoughts with other customers

Customers say

Customers find the book well worth the read and appreciate its depth, noting they can dig much deeper into necessary sources of information. The book is nicely written, with one customer highlighting its clear explanation of regexs.

AI-generated from the text of customer reviews

Select to learn more

17 customers mention "Value for money"17 positive0 negative

Customers find the book to be a valuable resource, with one customer noting it includes many useful examples.

"...Unix and Unix like systems better, then this is definitely an important book to read and keep by your side." Read more

"...but this book quickly got me up to speed on these ancient but wildly useful tools...." Read more

"This book is like a big tutorial series, packed with tons of applicable examples...." Read more

"...and optimized scripts, this book has become the single most valuable book I had purchased...." Read more

6 customers mention "Pacing"6 positive0 negative

Customers appreciate the book's pacing, finding it well-written and easy to understand, with one customer highlighting its clear explanation of regular expressions.

"...previously and solved with either tool makes it really easy to understand the argument at an intuitive level even before experimenting with it...." Read more

"Mr. Robbins usual clear, complete tutorial. A first-rate job...." Read more

"...Not only is it very informative it's also a fun and easy read... You'll be seeing uses for sed almost every day once you learn how powerful it can..." Read more

"...This is in depth and to explains everything. I wish there was a "pocket guide" but still great." Read more

4 customers mention "Depth"4 positive0 negative

Customers appreciate the depth of the book, noting that it allows readers to dig much deeper into necessary sources of information, with one customer mentioning it is packed with applicable examples.

"This book is like a big tutorial series, packed with tons of applicable examples...." Read more

"...my relationship to UNIX and I found I could dig much deeper into necessary sources of information, whether logs, configuration files or to begin..." Read more

"...1/2 or so is on awk and although it's also very well written and informative it's not quite as useful if you're already experienced with a high..." Read more

"...This have been a great help and has taught me a bunch of tips. This is in depth and to explains everything...." Read more

I learned a lot!
5 out of 5 stars
I learned a lot!
This book is amazing and holds a great educational value beyond merely learning the titular tools. It refers to itself as a handbook, which I find to be quite an understatement. It explains the tools using a unified framework approach which makes everything about them logical. It goes into their lineages and how under the stark difference in syntax, the two tools share a lot in terms of philosophy and underlying mechanics. The way they demonstrate each argument through use cases the authors had faced previously and solved with either tool makes it really easy to understand the argument at an intuitive level even before experimenting with it. But perhaps what I find pleasent the most about this book is the style of writing. You feel so close to the thinking process that produces it, yet you hardly feel any ego, unlike most technical publications today. I had hard time putting the book away and I was always keen on the time I set aside for reading it. Something I don't always experience with technical books. Perhaps it is that people were not allowed to publish unless they had a way with words before web 2.0 came along! (Just look at the photo attached of a hilarious footnote from the book). And as a data scientist heavily involved in Natural Language Processing, I was using what I learned on the go with my daily tasks. If you want to understand Unix and Unix like systems better, then this is definitely an important book to read and keep by your side.
Thank you for your feedback
Sorry, there was an error
Sorry we couldn't load the review

Top reviews from the United States

  • Reviewed in the United States on June 27, 2018
    This book is amazing and holds a great educational value beyond merely learning the titular tools. It refers to itself as a handbook, which I find to be quite an understatement.

    It explains the tools using a unified framework approach which makes everything about them logical. It goes into their lineages and how under the stark difference in syntax, the two tools share a lot in terms of philosophy and underlying mechanics.

    The way they demonstrate each argument through use cases the authors had faced previously and solved with either tool makes it really easy to understand the argument at an intuitive level even before experimenting with it.

    But perhaps what I find pleasent the most about this book is the style of writing. You feel so close to the thinking process that produces it, yet you hardly feel any ego, unlike most technical publications today. I had hard time putting the book away and I was always keen on the time I set aside for reading it. Something I don't always experience with technical books. Perhaps it is that people were not allowed to publish unless they had a way with words before web 2.0 came along! (Just look at the photo attached of a hilarious footnote from the book).

    And as a data scientist heavily involved in Natural Language Processing, I was using what I learned on the go with my daily tasks.

    If you want to understand Unix and Unix like systems better, then this is definitely an important book to read and keep by your side.
    Customer image
    5.0 out of 5 stars
    I learned a lot!

    Reviewed in the United States on June 27, 2018
    This book is amazing and holds a great educational value beyond merely learning the titular tools. It refers to itself as a handbook, which I find to be quite an understatement.

    It explains the tools using a unified framework approach which makes everything about them logical. It goes into their lineages and how under the stark difference in syntax, the two tools share a lot in terms of philosophy and underlying mechanics.

    The way they demonstrate each argument through use cases the authors had faced previously and solved with either tool makes it really easy to understand the argument at an intuitive level even before experimenting with it.

    But perhaps what I find pleasent the most about this book is the style of writing. You feel so close to the thinking process that produces it, yet you hardly feel any ego, unlike most technical publications today. I had hard time putting the book away and I was always keen on the time I set aside for reading it. Something I don't always experience with technical books. Perhaps it is that people were not allowed to publish unless they had a way with words before web 2.0 came along! (Just look at the photo attached of a hilarious footnote from the book).

    And as a data scientist heavily involved in Natural Language Processing, I was using what I learned on the go with my daily tasks.

    If you want to understand Unix and Unix like systems better, then this is definitely an important book to read and keep by your side.
    Images in this review
    Customer image
    7 people found this helpful
    Report
  • Reviewed in the United States on September 15, 2019
    I recently ran into a problem where I had to process some *massive* text files (many 10+ GB text files with medical data) and this book helped save me. In my case, I had datasets where the structure was changing over the years so I needed to preprocess them before I could load it into either SAS or R. I found partial solutions on the web but this book quickly got me up to speed on these ancient but wildly useful tools. If you, like me, find part of a solution that uses sed or awk on the web and want to know what the heck it is actually doing grab this book.

    The introduction to all things UNIX is surprisingly gentle. So, if you know how to find the Mac Terminal or a bash shell on a Windows box this book will be fine for you.

    While there are occasional references to old/dead technology the code is functional for modern UNIX (including Mac).
    7 people found this helpful
    Report
  • Reviewed in the United States on August 13, 2008
    This book is like a big tutorial series, packed with tons of applicable examples. It is not a reference, that's what the man pages are for, although the index if very good. In fact, the combination of the *BSD man pages and this book would give any man all the SED and AWK documentation he would ever need.

    SED and AWK are these two very terse programs that, if you don't use them everyday, you tend to forget their syntax and functionality. I am not an everyday user. Before I bought this book, I often visited one of my many SED/AWK bookmarks. After years of using both programs, I never really understood them. I knew just enough to do small one-liners. However, I recently needed to build a fairly complex script to perform an automated OS upgrade via the network. I knew SED and AWK could help me accomplish my task, but I didn't have a full understanding of their potential. That's when I decided to buy this book. I have since then deleted all of my SED and AWK bookmarks.

    After studying this book and highlighting the hell out of it, I have a clear understanding of these two tools and how to effectively utilize them.
    21 people found this helpful
    Report
  • Reviewed in the United States on December 14, 2008
    Computers do one basic job, they process data. Often, you do not have control over the output format of the data, but the stuff you want in in there somewhere. So you capture the output to a file, and then chop and hack at it with a text editor to get the data you want in format somewhat like you want.
    You can either spend the rest of eternity with a text editor or get these guys, and learn a bit to instruct them to do totally boring but useful drudgery. And perhaps learn about regular expressions and pattern matching. And then do something interesting.
    Don't worry, you will have do do it again, if for no other reason than the entity that controls the format of the data decided to change it, for no other reason than to annoy and confound you. But, since you have learned about pattern matching, a minor change will fix it, and you can go back to whatever.
    The specific purpose this time was to avoid subscribing to a listing service for cable tv programming. Zap2it publishes the listings on most newspaper websites, and program called wget allows me to write these listings to a file. Then using sed to slice and dice allows me to read simply formatted listings, and eventually feed them to a recording system.
    6 people found this helpful
    Report
  • Reviewed in the United States on November 5, 2015
    Just at a time when I became deeply embedded in SunOS 4.x work, I needed to be able to efficiently mange and manipulate text, I ran into a reference to the first edition of this book. It completely changed my relationship to UNIX and I found I could dig much deeper into necessary sources of information, whether logs, configuration files or to begin effectively creating highly functional and optimized scripts, this book has become the single most valuable book I had purchased.

    It has sed and awk are some of the most integral components to everything from large-scale host-to-host or array-to-array data migrations to optimizing log parsing to assist in data/system/storage trending prior to the days of OTS solutions.
    3 people found this helpful
    Report

Top reviews from other countries

Translate all reviews to English
  • Jean
    5.0 out of 5 stars ok
    Reviewed in France on June 18, 2018
    correspond en tout point. a ce qui était attendu par mon fils qui l’a commandé sur le site. très bien.
    Report
  • Vamp898
    5.0 out of 5 stars Hervorragende Ergänzung zu "Classic Shell Scripting"
    Reviewed in Germany on March 20, 2014
    Wer darüber nachdenkt sich dieses Buch zu kaufen sollte eventuell vorher "Classic Shell Scripting" des selben Verlags lesen.

    Dieses Buch beschreibt hervorragend sed & awk, aber eben nicht mehr. Viele Dinge in dem Buch machen natürlich nur Sinn oder ergeben einen Nutzen wenn man fundierte Shell-Scripting Fähigkeiten vorweisen kann.
  • nazareno
    5.0 out of 5 stars Got it 10 years ago, now again, it's a good buy, doesn't get old.
    Reviewed in the United Kingdom on October 12, 2017
    A classic, I had this book 10 years ago or more, and I enjoyed it then, now I got it again, and will enjoy it again.
  • Miguel
    5.0 out of 5 stars Los clásicos nunca mueren
    Reviewed in Mexico on November 6, 2021
    Los clásicos nunca mueren, excelentes herramientas para procesamiento de texto, en lo personal las utilizo, junto con M4, para mantener diversas versiones de código, en entornos CI/CD enfocados a la calidad.
  • Luca Francesca
    5.0 out of 5 stars Il riferimento definitivo
    Reviewed in Italy on February 3, 2013
    Se hai qualche dubbio o non ricordi qualcosa su sed o awk, questo è il libro che vuoi tenere sulla tua scrivania