[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check if a field is a number (integer or float)?

From: Ed Morton
Subject: Re: How to check if a field is a number (integer or float)?
Date: Sat, 19 Jun 2021 08:50:23 -0500
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

You REALLY should read Effective AWK Programming, 5th Edition, by Arnold Robbins to learn the basics of awk and THEN if you have questions about how to do certain things post them to appropriate forums established for people to ask such questions and get answers from their peers, e.g. comp.lang.awk on usenet, or https://stackoverflow.com/questions/tagged/awk. Directly emailing the gawk providers every time you have a question on how to do something in awk is outrageously inappropriate and a waste of their time. If you look at the mailing list archives at https://lists.gnu.org/archive/html/bug-gawk/ you'll see that only you are doing that.


On 6/19/2021 8:17 AM, Peng Yu wrote:

I am wondering what is the best way to test if a field is a number
(integer of float). I could use regex. But I am wondering if there is
a more awk-native way to do the test. Also if regex is used, what is
the regex that matches integer/float used awk. Thanks.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]