Preview: isnumeric.awk
Size: 284 B
//usr/share/awk/isnumeric.awk
# isnumeric --- check whether a value is numeric
function isnumeric(x, f)
{
switch (typeof(x)) {
case "strnum":
case "number":
return 1
case "string":
return (split(x, f, " ") == 1) && (typeof(f[1]) == "strnum")
default:
return 0
}
}
Directory Contents
Dirs: 0 × Files: 28