I\'m looking for a method to cast a string to an int in awk. I have the following which appears to be doing a string comparison
(note: field
Most new awks have an int() function.
But the method for casting documented in 'The Awk Programming Language' is shown as you do it, by using numericValue and +0. I don't have the book handy, but I think you can also cast for float value by using +0.0.
+0
+0.0
I hope this helps.