AWK Medium · Lesson 7

Value types: strnum, typeof and comparison traps

Predict when AWK compares as numbers or text, read typeof results, avoid subscript and CONVFMT surprises, and see how input numbers convert.

Lessons · AWK Medium · Lesson 7 of 10

Value types: strnum, typeof and comparison traps

Predict when AWK compares as numbers or text, read typeof results, avoid subscript and CONVFMT surprises, and see how input numbers convert.

Illustration for AWK
Predict when AWK compares as numbers or text, read typeof results, avoid subscript and CONVFMT surprises, and see how input numbers convert.