In a shell script - How do I round a decimal number (contained in a variable) to the nearest whole number?
Try...
echo $var|awk '{print int($1+0.5)}'
1 Like
thank you!