I am now on Twitter! Meet me on Twitter here (my nick is pkrumins.)
Or on Google Buzz and Facebook.

I love cheat sheets. I have at least 30 in front of me at the moment scattered throughout my desk: awk cheat sheet, vt100/ansi screen terminal emulation keyboard mapping cheat sheet, emacs command line editing mode cheat sheet, ethernet, ip and tcp header layout cheat sheets and many many others. I am glad that I can share the cheat-sheets with you so you can become a better developer! I have made some 15 out of 30 cheat sheets myself and I will make them available for download in the future posts.
Someone might say that looking the information up in a man or info page, manual or Google is equivalent to looking it up on a cheat sheet, if not better. I disagree.
First of all it is usually, but not always, takes more time to find where in the documentation the particular thing is located but in the cheat sheet you have it right in front of you. For example, suppose you were C programmer and forgot how to print a floating point number, you’d type `man 3 printf‘ and quickly find the answer. That’s fine - it’s as fast or even faster than looking something up in a cheat sheet but that’s just because you knew exactly what you were looking for! But let’s look at Joe Random who just began learning gawk programming language and at the moment wants to replace a part of a string with another string. He’d probably already have the manual open and would start going through it looking for string functions. It would take him a good minute or so before he finds the correct place and reads how the function works. Now, if he had a cheat sheet, like the one I created here, he’d have all the string functions in front of him and he would quickly locate that it is gsub or gensub. He’d find not only that but also all the other string functions and next time he has a problem he might remember the right function subconsciously.
What I want to emphasize is that the cheat sheets are not for NOT remembering things and just looking them up hundreds of thousands of times and never actually learning them but are FOR remembering and learning new things faster.
It is also interesting to find what technologies you have not used for a while because the cheat sheets pile up in most recently.
I made this cheat sheet in Microsoft Word because I am not that good with TeX, particularly formatting data so it looked nice.
So the awk cheat sheet is available in .doc and .pdf. I will usually post the cheat sheets in these two formats.
This cheat sheet contains:
- Predefined Variable Summary, which lists all the predefined variables and which awk versions (original awk, nawk or gawk) have it built in,
- GNU awk’s command line argument summary,
- I/O statements,
- Numeric functions,
- Bit manipulation functions,
- I18N (internatiolization) functions,
- String functions, and finally,
- Time functions.
If you notice any inaccuracies, mistakes or see that I have left something out, comment on this page, please!
PDF:
Download link: awk cheat sheet (.pdf)
Downloaded: 48254 times
Plain Text (.txt):
Download link: awk cheat sheet (.txt)
Downloaded: 21571 times
Microsoft Word 2000 format (.doc):
Download link: awk cheat sheet (.doc)
Downloaded: 3082 times
Are you interested in AWK programming language? Here are four great books on AWK from Amazon:
Did you like this post? Subscribe here:
If you really enjoyed the post, I'd appreciate a gift from my geeky Amazon book wishlist. Books would make me more educated and I could write even better posts. Thanks! :)

(7 votes, average: 4 out of 5)
|
|
|


August 2nd, 2007 at 6:40 pm
[…] I mentioned in awk and sed cheat sheet posts, the best method for me to learn a new tool is to have all commands in […]
August 16th, 2007 at 6:55 pm
Your awk cheat sheet will come in handy. Many thanks for taking the time to create and to share it.
March 28th, 2008 at 3:25 pm
[…] Awk, Nawk and Gawk cheat sheet […]
August 29th, 2008 at 11:47 pm
[…] you decide to learn Awk programming language, I suggest that you take a look at the Awk Cheat Sheet that I have made. Download GNU Awk YouTube Video […]
August 30th, 2008 at 5:26 pm
Thanks for creating and sharing this.
August 31st, 2008 at 11:07 pm
[…] my awk and sed cheat sheets might come […]
September 2nd, 2008 at 4:49 pm
[…] awk, nawk, and gawk cheat sheet […]
September 28th, 2008 at 6:27 am
[…] and Introduction by Bruce Barnett, which was full of examples to try out; then I created an Awk cheat sheet to have the language reference in front of me; and finally I went through the famous Awk one-liners […]
December 13th, 2008 at 2:55 pm
[…] recommend that you print out my Awk Cheat Sheet before you proceed. This way you will have the language reference in front of you, and you will […]
January 5th, 2009 at 7:34 pm
[…] my Awk cheat sheet and the local copy of Awk one-liners file awk1line.txt and let’s […]
April 7th, 2009 at 7:53 pm
[…] awk nawk and gawk cheat sheet - Awesome awk sheet, also check out awk is a beautiful tool […]
April 8th, 2009 at 9:43 am
[…] and other tools * Vi Cheat Sheet - Who doesn
April 10th, 2009 at 2:29 am
Great cheat sheet. And for yet for information on awk see http://awk.info
April 10th, 2009 at 9:39 am
[…] awk nawk and gawk cheat sheet - Awesome awk sheet, also check out awk is a beautiful tool […]
April 16th, 2009 at 1:49 pm
Great cheat sheet, even handy if you already have awkcard, the one that comes with the gawk distribution.
Taking a hint from the latter, if it isn’t too hard perhaps you could highlight text that applies only to gawk.
August 13th, 2009 at 6:33 am
Awesome.. Thanks Man.. The cheat sheet is my bible for AWK. I have recommended the sheet for my friends too.
August 21st, 2009 at 10:07 am
I’m a total newbie in unix, though I have considerable programming experience in another environment… I totally agree with your motto “good coders code, great reuse”!!
Thanks a lot
Carla