sed & awk

sed & awk

4.6 35
by Dale Dougherty, Arnold Robbins
     
 

View All Available Formats & Editions

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,

Overview

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).

Product Details

ISBN-13:
9781449396602
Publisher:
O'Reilly Media, Incorporated
Publication date:
03/01/1997
Series:
Nutshell Handbooks
Sold by:
Barnes & Noble
Format:
NOOK Book
Pages:
434
Sales rank:
1,021,939
File size:
3 MB

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >

Sed and Awk 4.6 out of 5 based on 0 ratings. 34 reviews.
Anonymous More than 1 year ago
Does what it says helps you learn sed and awk. Also helps you learn regualr expressioins
Anonymous More than 1 year ago
"Thank you" the tabby warrior says as he heads towards the warriors den.
Anonymous More than 1 year ago
2 before 5!!! Awesome!!
Anonymous More than 1 year ago
But you stand here for a reason.
Anonymous More than 1 year ago
Theres a cyclops ahead. Problaby 305 millinea old heading this way.
Anonymous More than 1 year ago
"Do we look like them? I think I have two eyes. Not one."
Anonymous More than 1 year ago
-.-
Anonymous More than 1 year ago
"LEMME AT EM"
Anonymous More than 1 year ago
He finished off the last cyclops, pulling a splinter from his arm, and sheathed his sword. He walked over to the group.p, staying in the shadows.
Anonymous More than 1 year ago
He leaned against a nearby tree, calmly breathing. He tiredly twirled his dagger, the tip of the blade gently pushing into his left hand. <p> [Do we move now? And if so, someone needs to go post their post first, because my results are different and I don't know where main camp there is.]
Anonymous More than 1 year ago
Im a warrior and im firery orangae and striking blue eyes an d i will always protect u and kits if i was ur mate so van pls be ur mate?
Anonymous More than 1 year ago
A small kit stumbles into camp. She is bleeding a tad on her back. Hello my name is treekit. May i plese join. My mum got killed by some big scary animal. Tree kit is very small. She is an orange she cat with blackish blue eyes.
Anonymous More than 1 year ago
Can I join just so you know I'm a black she-cat with green eyes and I'm timid and I forgot to say I have cuts and thorns all over me and I'm very thin
Anonymous More than 1 year ago
Can i join your clan?
Anonymous More than 1 year ago
Hey guys eont be on much on vacation srry))
Anonymous More than 1 year ago
"Hi everybody!" (Sorry i was gone!)
Anonymous More than 1 year ago
My name is Cherryflower and i am a pinkish gray she cat with golden eyes. I would like to be medicine cat.
Anonymous More than 1 year ago
At gundor al results. For sourons sid go to black gates all results
Anonymous More than 1 year ago
Guest More than 1 year ago
Unix has earned itself quite a reputation for its potent tools, used for batch editing of text files (like program output). Sed and Awk are two of these tools. Sed is a direct descendent of Ed, the original Unix line editor, which employs regular expressions, a powerful method for description of patterns in text, for operations like substitute, append or delete. Awk is a complete scripting language with programming structures like conditionals, loops, functions etc., developed in 1970's by Alfred Aho, Brian Kernighan and Peter Weinberger (hence A-W-K). The trio has also written a book on Awk.

Dale Dougherty (in the 2nd edition with Arnold Robbins, maintainer of GNU Awk and author of several more books on Awk programming language) have made a good job in making a thoroughly readable tutorial on Sed and Awk. However, it remains a mystery to me how they succeeded to fill no less than 407 pages with it. Mind you, Sed and Awk are not really some big monsters. There exist something like two dozens of operators in Sed (most of them you will probably never use), and the syntax of Awk mimics those of C programming language, so it is likely that you know it already. Once you grok the idea of regular expressions, you should become a proficient user of Awk in about 30 minutes.

In conclusion, go buy the book if your need to manipulate text files on Unix and you think you need a lengthy tutorial with a gentle learning curve. Otherwise, short references on Awk and Sed, like the ones in Unix Power Tools and a bunch of examples showing some tricks you might not think of, will probably be more useful. In addition, it is good to know that during the nineties, much of the focus has drifted from Awk to Perl, so you might consider a book on Perl as well.

Guest More than 1 year ago
You will get sick of hearing from your co-workers how 'they gotta get this book'. It's that good. Both of these fantastic tools helped out as we needed to provide detailed file information during the latest ILOVEYOU virus fiasco on over 250 servers.
Anonymous More than 1 year ago
Move to 'borgias'! Asher is locked out!
Anonymous More than 1 year ago
"Pfff did you actually think I would keep you?" I blink innocently, "Aaaaanyway, make yourself at home. Or not. Idc" I shrug and walk over to the tables, sitting down and taking a gulp of my protein-enriched fruit smoothie
Anonymous More than 1 year ago
The giant squid flew off to the sign that says "WELCOME TO CAMP HALF BLOOD" And flew to her baby squids in the middle of the hill, "MY BABIES IVE MISSED YOU SO MUCH, IVE CAME ACROSS THE CAMPS AND WOODS TO GET TO YOU GUYS" as the baby squids roared at her mama happy with joy, the mama squid sat with her babies on the middle of the "welcome to camp half blood" sign hill, as they all roared loudly with joy.
Anonymous More than 1 year ago
He yawned and decided to call it a night. He went to the Apollo Cabin to get some sleep. ((Gtgtb bbt))