How to convert floating point number to integer?
77
votes
5
answers
229493
views
Is this the right way to do float to integer conversion in bash? Is there any other method?
flotToint() {
printf "%.0f\n" "$@"
}
Asked by Rahul Patil
(25515 rep)
Sep 6, 2013, 08:36 PM
Last activity: Oct 29, 2023, 07:34 PM
Last activity: Oct 29, 2023, 07:34 PM