I have the following situation...
the variable INP can have the following values...
3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6
i need the awk statement to return...
3, 3.1, 3.2, 3.3, 3.4, 3.5, 4
in other words, 3.0 will be 3 and 3.6 will be 4
i tried something along the lines of...
echo $INP | awk -F. '{ if($2=0 || $2=6) printf "%.0f",$0}'
This does not work. PLEASE HELP!! THANKS IN ADVANCE!!!
the variable INP can have the following values...
3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6
i need the awk statement to return...
3, 3.1, 3.2, 3.3, 3.4, 3.5, 4
in other words, 3.0 will be 3 and 3.6 will be 4
i tried something along the lines of...
echo $INP | awk -F. '{ if($2=0 || $2=6) printf "%.0f",$0}'
This does not work. PLEASE HELP!! THANKS IN ADVANCE!!!