5 ms·
I would also recommend the good awk blog post series of Jonathan Palardy: * http://blog.jpalardy.com/posts/why-learn-awk/ * http://blog.jpalardy.com/posts/
by aseure 9y ago
I would also recommend the good awk blog post series of Jonathan Palardy:
* http://blog.jpalardy.com/posts/why-learn-awk/
* http://blog.jpalardy.com/posts/awk-tutorial-part-1/
* http://blog.jpalardy.com/posts/awk-tutorial-part-2/
* http://blog.jpalardy.com/posts/awk-tutorial-part-3/
- cannedslime 9y agoThanks to you... and OP! I have been using posix systems for years but never really touched awk because what I have seen have seemed like archaic chants of dark magic, very good resources for learning about this nifty tool.
- asicsp 9y agoglanced a bit, looks good.. will add it to further reading section, thanks :) has some minor issues though > modern (i.e. Perl) regular expressions nope, supports only ERE.. doesn't have non-greedy, lookarounds, etc > $ cat netflix.tsv | awk '{printf "%s %15s %.1f\n", $1, $6, $5}' | sed 1d could have just added NR>1 condition..
- matt_wulfeck 9y agoYeah that’s really tough for me. PCRE really sets the bar for modern regular expression engines. Awk predates it by a decade.
- microtherion 9y agoTWO decades!
- kazinator 9y agoNot to mention that awk takes filename arguments, so this is an egregiously useless use of cat.
- twmb 9y agoFrom the second post, > Alternatively, awk '{print $2}' netflix.tsv would have given us the same result. For this tutorial, I use cat to visually separate the input data from the AWK program itself. This also emphasizes that AWK can treat any input and not just existing files.
- nejenendn 9y agoNot to mention this is the point of the < operator.