Skip to content

Commit

Permalink
cukinia: correct _ver2int output format
Browse files Browse the repository at this point in the history
The current implementation of _ver2int lets awk format the result.
On some machines, this could lead to result written in scientific
notation, which is harder to compare.

This commit use a printf command to ouput the result in decimal.
  • Loading branch information
eroussy committed Aug 24, 2023
1 parent 1bf7eb3 commit db70539
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cukinia
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,8 @@ _ver2int()
{
echo "$1" | awk '{
split($1, A, ".");
print(A[1] * 10^12 + A[2] * 10^8 + A[3] * 10^4 + A[4]);
result = A[1] * 10^12 + A[2] * 10^8 + A[3] * 10^4 + A[4];
printf("%.0f\n", result);
}'
}

Expand Down

0 comments on commit db70539

Please sign in to comment.