#! /bin/bash
if [ $# -ne 1 ]
then
echo "Usage: round floting-point-number"
exit
fi
float=$1
dez=`echo $float | cut -d. -f1`
fract=`echo $float | cut -d. -f2`
fract=`expr $fract + 5`
if [ $fract -gt 9 ]
then
dez=`expr $dez + 1`
fract=0
else
fract=0
fi
echo $dez.$fract