I have a command awk
that also gives the specified result.
echo '1600000.00000000' '1600000.0000' | awk '{ print ($1 != $2) ? "true" : "false" }'
Result: - false
According to the numerical value, the result specified by the command is correct. But I want the team to consider both inputs ( '1600000.00000000'
'1600000.0000'
) as string
and give the result as true
. Because if you consider both inputs as string
, then they are not equal, the difference is accuracy.
source
share