Hacker News new | ask | show | jobs
by asicsp 3158 days ago
glanced 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..

2 comments

Yeah that’s really tough for me. PCRE really sets the bar for modern regular expression engines. Awk predates it by a decade.
TWO decades!
Not to mention that awk takes filename arguments, so this is an egregiously useless use of cat.
From 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.

Not to mention this is the point of the < operator.