Newbie question: how to learn (N)AWK 
Author Message
 Newbie question: how to learn (N)AWK


says...

Quote:
> Hello to you all,

> as an UNIX newbie I try to learn the AWK programming language. I've
> got this book with all comands, but I think examples might help also.
> Can someone advise me where to find these examples on the Web, or can
> someone advise me on a good book.

> Thanks a lot

> Ruud

Get "The AWK Programming Language", but Kernigan, Aho and Weinberger.  
It's a thin, but dense little book.  Barnes and Noble can order it for
you.  That book has tons of great examples.  In fact, the beginning is
nothing BUT "here are some great little one-liner programs".

One of the best {*filter*} things you can do with awk is strip off a column
of data in a file, do some {*filter*} math, and get new output.  For
example, if you have a large data with angle data in it, in radians, and
want it in degrees, you can do

cat radians.dat | awk '{print $1/3.14159*180,$2/3.14159*180}' >
degrees.dat

where $1 is the first column, $2 is the second, etc.  Separate with
commas.

--
Dan Stephenson

(Remove the nospam from my email address before replying with email.)



Sun, 18 Aug 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. learning awk (newbie)

2. IP number change on fortress.uccb.ns.ca AKA w3.uccb.ns.ca

3. AWK newbie is looking for a AWK help with his 1st program

4. Newbie's Questions about the Learning of FPLs Implementation

5. Newbie Question: Books to Learn FORTRAN

6. Newbie question: exceptions in Learning Python

7. Newbie awk (sed??) question, regular expressions

8. A Newbie AWK question

9. Newbie question -- to make an awk program act on a collection of files

10. AWK for DOS - NewBie Question

11. newbie awk question

12. awk Newbie question

 

 
Powered by phpBB® Forum Software