by aseure · 9y ago · 0 comments
* 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/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..
> 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.