Eric Pement's AWK one-liners

Visit the AWK one-liners page and download the one-liners in file awk1line.txt. Or get it directly from the command line:

wget  http://www.pement.org/awk/awk1line.txt

Read through them. You may not understand some of them, while others you will. Freelance a little: for those you understand, create a text file with content suitable for you to run the one-liner and compare its behavior with your expectation.

Obtain  the awk-experiments script. You could get it with wget:

wget  http://homepage.smc.edu/morgan_david/linadmin/downloads/awk-experiments.zip

Unzip it to obtain awk-experiments. Make it executable and run it:

chmod  +x  awk-experiments


awk-experimentses uses selected one-liners from the awk1line.txt document. It processes them one at a time, printing on screen both the one-liner or command itself and its output. Study/compare them and try to satisfy yourself that you understand how the output results from the one-liner's awk syntax. If it's not clear, there may be a comment in Eric's awk1line.txt that helps explain.