Why do you find it odd? I find it to be the very best introduction to C-style control structures.
Chapter 2 of The AWK Programming Language has incredible benefits for a novice.
https://archive.org/download/pdfy-MgN0H1joIoDVoIC7/The_AWK_P...
Chapter 2 of The AWK Programming Language has incredible benefits for a novice.
https://archive.org/download/pdfy-MgN0H1joIoDVoIC7/The_AWK_P...
<line-condition> { <code> }
That's unusual enough among programming languages to call it odd. Being able to do stuff like if (/some-pattern/) { ...
and have the regex be evaluated like a condition where it matches with the current line implicitly is also pretty unique. if (/some-pattern/) { ...
This isn't really unique when you consider perl. while (<>) {
if (/pattern/) {
This does the same. Awk simply has the implicit loop.