10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear All,
I read some variables in a file and assigned as name for each of them.
If I do echo I am able to see the values as 1.0E-05,3.4,5.0E-03 etc,
Now I want to do some mathematical operations with them.
Lets say
1
1.0E-05*5.0E-03
expected ans is 5.0E-08
2
1.0E-05/5.0E-03
expected... (9 Replies)
Discussion started by: linuxUser_
9 Replies
2. Homework & Coursework Questions
Hello Guys,For my homework I must write a shell script to do this serie,
http://upload.wikimedia.org/math/f/8/f/f8f543d9ecd01c4ecca2a0b7bc1234a2.pngI know that I must use the "bc" for that, but for the script's itself i have no idea,(beginner)
Can you plz just help me for have some idea?... (1 Reply)
Discussion started by: hamed.samie
1 Replies
3. Homework & Coursework Questions
Hello Guys,For my homework I must write a shell script to do this serie,
http://upload.wikimedia.org/math/f/8/f/f8f543d9ecd01c4ecca2a0b7bc1234a2.pngI know that I must use the "bc" for that, but for the script's itself i have no idea,(beginner)
Can you plz just help me for have some idea?... (1 Reply)
Discussion started by: hamed.samie
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a tab delimited text file with three different columns. I want to add an extra column to the text file. The extra column will be the second column and it will equal third column - 1. How do I go about doing that? Thanks!
Input:
chr1 788822 rs11240777
chr1 1008567 rs9442372... (2 Replies)
Discussion started by: evelibertine
2 Replies
5. Shell Programming and Scripting
Hi
want to do below mathematical calculations in shellscrip but it is not giving me the exact output.Please help me to solve this
price=95.3
price1=(20/100)*$price+$price
echo "price=$price1"
finally the output should display price=114.36
Thanks (5 Replies)
Discussion started by: aish11
5 Replies
6. Shell Programming and Scripting
Hi, I'm creating a loop that allows the user to enter any number, then their choice of operator and then another number until their operator choice is equal to =
But I am getting an error saying integer expression expected. Any explanation on why this is happening?
echo "Please enter a number"... (1 Reply)
Discussion started by: Addman1991
1 Replies
7. Shell Programming and Scripting
Hello,
I have a bunch of xml file that needs to have edits made and I was wondering if a BASH script could handle it.
I would like the script to look within my xml files and replace all integers greater than 5px with a value that is 25% smaller. For example, 100px = 75px. Since the integers... (12 Replies)
Discussion started by: jl487
12 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a file with thousands of lines like this:
Chr1 477515 . ACCCC ACCC 17.7 . INDEL;DP=17;AF1=1;CI95=0.5,1;DP4=0,1,0,3;MQ=32;PV4=1,0.036,1,1
Chr1 481987 . A AAAT 62 . INDEL;DP=11;AF1=1;CI95=0.5,1;DP4=0,0,1,3;MQ=41
I want to make a file with... (2 Replies)
Discussion started by: fadista
2 Replies
9. Shell Programming and Scripting
I have a txt file with two columns
Freq Loss
10 30
20 40
30 10
40 50
50 60i have used the below code to get the minimum value out of this array in second cloumn.
awk 'NR==N{min=$N;max=$N}NR>N{if ($N>max){max=$N};if ($N<min){min=$N}}END {print... (3 Replies)
Discussion started by: shashi792
3 Replies
10. Shell Programming and Scripting
I am getting the error:
Runtime error (func=(main), adr=10): Divide by zero
When executing the mathematical expression:
echo "scale=2; 1-(0/0)"|bc
How to overcome this? (5 Replies)
Discussion started by: proactiveaditya
5 Replies