Hello,
In a unix shell script,i want to round a variabele to a nearest number
Ex: set count=104.4
How can i round that to 105.?
Thanks,
Sateesh (2 Replies)
Hi ....
Iam having the file ....in which 3rd column is numerical having 8 decimal part... i want that to cut to 2 decimal part ...
Source File :
E100|0|19940.10104030|0|1ABC
E103|1|19942.10195849|3|0ABC
E100|0|19943.10284858|0|1ABC
I want to be ......
Reulst:
... (4 Replies)
Hi, I have a problem. Basically I dont know how to use awk. I have a script (below) which works fine.
What I want to do is somehow "pipe" in the input say 4.5 and have it give the anwer, I dont want ot have to type it in, since it will be running in a script.
Any ideas how to do this????
... (1 Reply)
i'm a newbie here, i need help with a shell script.
for a given number, if it is greater than ten round to the nearest 10
same for 100, if it is greater than 100 round to the nearest 100, and same for 1000.
i'm confused how to start this...
its supposed to look like this
input ... (11 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:#include <stdio.h>
#define GTAX 0.06
#define STAX 0.10
int main(void)
{
int C_sets;
double Price_C;
... (1 Reply)
Hey everyone, I was wondering if i am able to write a sed command to round a number to two decimal places. So for example:
1.58674
would be
1.58
I just want to chop off the numbers to the right of the second digit after the period. I know this is probably trivial but the closest i got was... (8 Replies)
Hi All,
I would like to do the following in the shell script
561.76 to 562
I tried using this echo 'scale=0; 749 * 75 /100 ' | bc
but just returned only 561
Please help me . I appreciate your help
Thanks
rajeevm (13 Replies)