
Announcing my first e-book "Awk One-Liners Explained" - pkrumins
http://catonmat.net/blog/awk-book/
======
unwind
I'm sure this is an awesome resource, and I really should check it out since I
want to learn more of awk.

That said, I find the initial "appetizer" example a bit contrived. To print
all users from /etc/password from the command-line would probably not be done
by writing a C program, by most (sane) people.

I would just do "cut -d: -f1 /etc/passwd", which feels simpler than the awk
example.

~~~
hugh3
_To print all users from /etc/password from the command-line would probably
not be done by writing a C program, by most (sane) people._

I used to work with a guy who would have done it that way. I do admit he was
not entirely sane.

Personally I'd do it with two or three lines of python rather than awk, even
though I theoretically know awk, because it's quicker for me to type the
Python than to remember the syntax for the awk (wait, which brackets are which
again?).

That's not an argument against learning awk, of course, that's an argument for
why I should learn awk slightly better.

~~~
kisielk
You sound like an exact match of the audience of this book.

------
pasbesoin
pkrumins, out of curiosity (and the suspicion that you probably have ;-), have
you written up you ebook publishing process?

~~~
pkrumins
I have not yet written about it, but I will do that in a bit! The whole
process was very interesting!

~~~
spatten
I'd love to hear about it too.

From a slightly selfish perspective, I'd love to know if you knew about
Leanpub (<http://leanpub.com>) and, if you did, what about it made you do the
work of publishing it yourself rather than going through us.

I only ask because you really fit our target author profile perfectly, and we
obviously screwed something up if you knew about Leanpub and still decided to
build the workflow and sales site yourself :).

If you didn't know about Leanpub, then obviously we need to market better.

------
jgeralnik
Really? The reason I should learn awk is "why not?" That has to be one of the
worst reasons ever.

Not that I am bashing awk or anything. I'm sure there are many reasons to
learn it. But why not is definitely not one of them.

~~~
lanstein
I had the same question the other day, and it turned into a spontaneous all-
company "why you should use awk" lesson. If this kind of thing sounds cool to
you, drop me a resume at david at loggly.com. We're at 1st and Mission in SF.

Short answer, it's a baby programming language that's more powerful than sed,
quicker to write than python, and less confusing than cut.

~~~
veyron
I resent the use of the word "baby" -- I have seen entire quantitative trading
platforms built in awk

~~~
prakashk
Perhaps the ETrade baby uses that program? (ducks)

------
freejoe76
I suddenly have a desire to write a companion piece based on my experiences
talking with women I just met: "Awkward one-liners explained."

------
forkrulassail
_inserts coin_

~~~
pkrumins
_insert coins, get pdf ebooks._

------
zoowar
Save your money or donate it to the FSF

<http://www.gnu.org/software/gawk/manual/>

<https://my.fsf.org/donate/>

~~~
SoftwareMaven
Manuals are good once you already know something or if you want to become an
expert. I don't think either of these are the buyer of the one-liner book. The
one-liner buyer is a person who has the occasional need to script and doesn't
want to have to become an expert again every time they need to do something.

I learned enough awk once-upon-a-time that I think the book could be very
useful. I tend to do python three-liners like somebody else here mentioned,
but if I had a very quick way to find the awk, I'd use it more. The problem I
have is that I'm not sure an ebook makes it fast enough.

