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. Shell Programming and Scripting
I have 2 numbers
xmin = 0.369000018
xmax = 0.569000006
and want to calculate
(xmax- xmin) / 5.0
I have tried using $(( )) but is always giving an error (8 Replies)
Discussion started by: kristinu
8 Replies
3. Shell Programming and Scripting
hi,
I have a file with decimal/non-decimal values
$ cat b22
373 164 92 62 20 131 94 12 129 111 95 154 37 15 447 25 7.4 135 77 122 32 92 70 57 37 42 72 17 13 97 40 41 53 22 80 71 29 87 23 31 273 6.2 12K 43 44 45 22 11 7.7 13 18 173 36 20 18 13 56 67 104 53 5.4 241 19 13 3.8 38 14 31 329 16 155... (8 Replies)
Discussion started by: sam05121988
8 Replies
4. Shell Programming and Scripting
Hi all,
Thanks in Advance , i am very new to programming part in script i think using some caluations+ sed command only we can do this process in script.
for exampl:
i have file in that one line is like this
using sed i can replace the date and all but my requirement is
The... (3 Replies)
Discussion started by: anishkumarv
3 Replies
5. Homework & Coursework Questions
Hello everybody,
I decided to take a Unix Introduction class and have never had experience with programming. Everything was fine until recently when the Prof. started shell scripting and he wants us to make a small script to add unlimited numbers from arguments and from standard input.
I... (8 Replies)
Discussion started by: Florinel76
8 Replies
6. Shell Programming and Scripting
Hello everybody,
I decided to take a Unix Introduction class and have never had experience with programming. Everything was fine until recently when the Prof. started shell scripting and he wants us to make a small script to add unlimited numbers from arguments and from standard input.
I... (1 Reply)
Discussion started by: Florinel76
1 Replies
7. Shell Programming and Scripting
I am begining to learn bourne shell and as a practice I have written a script which when given the purchase price and percentage of discount calculates the savings.
I somehow cannot figure out why my script fails to do arthimatic calculation on real numbers.
Could anyone look at the script... (5 Replies)
Discussion started by: Tirmazi
5 Replies
8. Fedora
Hey, I just wanted to know how one can write simple arithmetic like addition, subtraction, multiplication and division in shell-script. (14 Replies)
Discussion started by: #moveon
14 Replies
9. Shell Programming and Scripting
I am writting a script in the ksh shell and am trying to find a way to report the total execution time of the script without requiring the user to specify the time function when executing the script.
Does anyone have any examples they have used. I have been setting up two date variables (one at... (1 Reply)
Discussion started by: Omar Bacha
1 Replies
10. Shell Programming and Scripting
I am trying to do a shell script to monitor if any files went through in the last hour.
There is a script in cron that runs every sec checking to see if a file is there and ftp the file out of this folder.
Now I just want to add a block of code that will check to see no files went in the last... (3 Replies)
Discussion started by: jonathan184
3 Replies