Hi All,
Is there any command which can convert binary decimal coded values to ascii values...
i have bcd values like below
оооооооооооо0о-- -v -
Pls suggest a way to convert this.
Thanks,
Deepti.Gaur (3 Replies)
Hi All,
In my script I've written like this-
c=$( expr 100 / 3);echo $c
The output coming is 33. but I want to see 33.33, decimal values too. How to get that?
Thanks,
Naresh (3 Replies)
Please help me in rounding up value upto 2 decimal palces using sed command
#!/usr/bin/bash
a=15.42
b=13.33
c=`echo $a*$b |bc -l`
echo $c
above code is is giving output "205.5486" but i want the output as "205.55"
Thank you... (15 Replies)
Input file:
USA 20.5683
UK 3.54221
Japan 2.54001
China 2.50897
Germany 2.05816
.
.
Desired output file:
USA 20.57
UK 3.54
Japan 2.54
China 2.51
Germany 2.06
.
. (2 Replies)
Hi!
I found and then adapt the code for my pipeline...
awk -F"," -vOFS="," '{printf "%0.2f %0.f\n",$2,$4}' xxx > yyy
I add -F"," -vOFS="," (for input and output as csv file) and I change the columns and the number of decimal...
It works but I have also some problems... here my columns
... (7 Replies)
Hi, all
I have a field in a file looks like this(hundreds of lines):
inf
1.24101
-0.185947
-0.349179
inf
0.126597
0.240142
-0.12031And what I expect is:
inf
1.241
-0.186
-0.349
inf
0.127 (7 Replies)
Discussion started by: nengcheng
7 Replies
LEARN ABOUT FREEBSD
round
ROUND(3) BSD Library Functions Manual ROUND(3)NAME
round, roundf, roundl -- round to nearest integral value
LIBRARY
Math Library (libm, -lm)
SYNOPSIS
#include <math.h>
double
round(double x);
float
roundf(float x);
long double
roundl(long double x);
DESCRIPTION
The round(), roundf(), and roundl() functions return the nearest integral value to x; if x lies halfway between two integral values, then
these functions return the integral value with the larger absolute value (i.e., they round away from zero).
SEE ALSO ceil(3), floor(3), ieee(3), lrint(3), lround(3), math(3), rint(3), trunc(3)STANDARDS
These functions conform to ISO/IEC 9899:1999 (``ISO C99'').
HISTORY
The round() and roundf() functions appeared in FreeBSD 5.3. The roundl() function appeared in FreeBSD 6.0.
BSD April 7, 2005 BSD