ad- hoc tips
Monday, November 3, 2008
Rounding in awk
echo $1 | awk '
function round(aa) {
return int( aa + 0.5 )
}
{
printf("%d\n",round($1));
}'
Stolen from
link
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
▼
2008
(11)
▼
November
(2)
Ceiling in awk
Rounding in awk
►
October
(9)
About Me
Saravanan
View my complete profile
No comments:
Post a Comment