I have a following data: "210000000080401".I need to convert the hex '210000000080401' to its decimal form.
Using Awk is not giving the correct result:
echo 210000000080401|awk -Wposix '{printf "%d %s\n", "0x" $1, $0}'148618787703751680 210000000080401
while the correct value is 148618787703751681
echo 210000000080401 | tr '[:lower:]''[:upper:]'|xargs -i{} bash -c 'printf "%d\n" 0x{}'148618787703751681
Why is Awk not giving the correct output?