9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have two variable and I need to calculate the percentage of them.
Example:
(b-a)*100/b
How can I do it? I need to do it till 2 decimal point. (16 Replies)
Discussion started by: Anupam_Halder
16 Replies
2. Shell Programming and Scripting
Hi everyone!
Easy question for everyone. I'm trying to run a command line to find an exact match of a decimal number within a file. The number can be a positive OR negative number. For instance, if I want to find only the number -1 in the file that has:
-17.6
-17
-16.3
-16.2
-15.7
-15.3... (6 Replies)
Discussion started by: lucshi09
6 Replies
3. Shell Programming and Scripting
Hi All,
I have a file of decimal numbers,
cat file1.txt
1.1382666907
1.2603107334
1.6118799297
24.4995857056
494.7632588468
560.7633734425
.....
I want to see the output as only 7 digits after decimal (5 Replies)
Discussion started by: senayasma
5 Replies
4. Shell Programming and Scripting
Hi Gurus,
I am working with a korn shell script to simplify some operations of calculation number of lines inside compressed file.
The called function (inside a cycle) is the following:
#########################################
# F.ne: CheckCount
#########################################... (3 Replies)
Discussion started by: GERMANICO
3 Replies
5. Shell Programming and Scripting
echo "scale=2; 282.73/640" | bc
This will print .44
How to make the variable as 0.44 (2 Replies)
Discussion started by: sandy1028
2 Replies
6. Shell Programming and Scripting
Dear users,
I need your support, I have a file like this:
272134.548 6680572.715
272134.545 6680572.711
272134.546 6680572.713
272134.548 6680572.706
272134.545 6680572.721
272134.543 6680572.710
272134.544 6680572.715
272134.543 6680572.705
272134.540 6680572.720
272134.544... (10 Replies)
Discussion started by: Gery
10 Replies
7. Shell Programming and Scripting
Hi,
I would like test if a number is a decimal number or not (9 Replies)
Discussion started by: francis_tom
9 Replies
8. Shell Programming and Scripting
Hi
am calculating the percentage of the pass and fail.
Pass:
echo `echo 1498*100/1667| bc`%
fail:
echo `echo 169*100/1667 | bc`%
for this am getting
PASS= 89%
fail =10 %
I need to fetch the exact decimal percentage like
PASS = 89.8 %
FAIL= 10.2 %
Please advice me (3 Replies)
Discussion started by: bobprabhu
3 Replies
9. Shell Programming and Scripting
I've searched the forum and google, but can't see an answer to this simple problem. Here's my small test script:
#!/bin/csh
echo "enter a number:"
read num
echo "you entered $num"
set num = `expr $num + 1`
echo new value is $num
can someone show me how to do this calculation? note that... (4 Replies)
Discussion started by: tpatput
4 Replies