In a series of similar questions, what is the best AWK reference you've ever seen?
If there isn't really one (I've yet to find the grail), perhaps we could compile one in a separate question.
In a series of similar questions, what is the best AWK reference you've ever seen?
If there isn't really one (I've yet to find the grail), perhaps we could compile one in a separate question.
Whenever I needed to know something about AWK I always went to my copy of UNIX in a Nutshell. Now I see that there is a SED/AWK in a Nutshell book and pocket guide. The former was enough for what I needed. Haven't used the latter two.
The AWK Programming Language, by Aho, Kernighan and Weinberger is the best. The initials of the author's names should tell you why...
This reference card PDF is pretty comprehensive for a crib sheet, yet it's concise enough to allow you to find what you need quickly. It also includes information on the mawk and gawk implementations.
I would recommend Effective AWK Programming by Arnold Robbins. You can get free pdf copy here.
I find this site to be useful (it hasn't let me down yet):
http://www.grymoire.com/Unix/Awk.html
I also find this Cookbook style site quite inspirational:
http://student.northpark.edu/pemente/awk/awk1line.txt
Hope these help.
a database containing week_of days,veg.name,price write a program in awk to calculate average of each vegetable,for calculating take the highest price in the day(it is sale more than 1 times in same day) in the formate
veg.name average ....... ....... ....... .......