The gawk command in Red Hat Enterprise Linux 4 may not convert hexadecimal values properly

Solution Verified - Updated -

Issue

  • gawk 3.1.3 functionality incorrect
  • Passing hexadecimal values through the "-v" option to gawk may generate incorrect results.  For example:
    echo 0xABCDEF | awk -vVAL="0x1234" '{value=VAL; print strtonum(value); value=$1; print strtonum(value); }'
    0
    11259375
    

    The first value ("0") is incorrect.

Environment

  • Red Hat Enterprise Linux 4
  • gawk-3.1.3-10.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content