10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk below I am trying to add a penalty to a score to each matching $1 in file2 based on the sum of $3+$4 (variable TL) from file1. Then the $4 value in file1 is divided by TL and multiplied by 100 (this valvue is variable S). Finally, $2 in file2 - S gives the updated $2 result in file2.... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
I want to count the number of lines, I need this result be a number, and sum the last numeric column, I had done to make this one at time, but I need to make this for a crontab, so, it has to be an script, here is my lines:
It counts the number of lines:
egrep -i String file_name_201611* |... (5 Replies)
Discussion started by: Elly
5 Replies
3. Shell Programming and Scripting
Hi,
I have a text file like this
6.0000E-02 0.00000E+00 0.0000 0.00000E+00 0.0000
7.0000E-02 5.00000E-10 1.0000 5.00000E-10 1.0000
8.0000E-02 3.00000E-09 0.4082 3.00000E-09 0.4082
9.0000E-02 3.50000E-09 0.3780 3.50000E-09 0.3780
1.0000E-01 1.00000E-09... (2 Replies)
Discussion started by: f_o_555
2 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I am new to Linux environment , I working on Linux script which should send auto email based on the specific condition from log file. Below is the sample log file
Name m/c usage
abc xxx 10
abc xxx 20
abc xxx 5
xyz ... (6 Replies)
Discussion started by: asjaiswal
6 Replies
5. Shell Programming and Scripting
Hi,
I have a log file created from a load balancer showing connections to each member of a two member pool with the following format (where first field is source IP, second field is load balanced IP address and third field is destination member. I need to plot a graph by date/time and number of... (5 Replies)
Discussion started by: shog63
5 Replies
6. Shell Programming and Scripting
Hi friends,
This is sed & awk type question. It is slightly different from my previous question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers (but no more than 10 numbers in series) whenever i find it and produce an output file with the... (4 Replies)
Discussion started by: kaaliakahn
4 Replies
7. Shell Programming and Scripting
Hi friends,
This is sed & awk type question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example
###start of input text file ####
abc
def
ghi
1
2
3
4
kjld
random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies
8. Shell Programming and Scripting
Hi again,
I need to further process the results of a previous manipulation.
I have a file with three columns
e.g.
AAA5 0.00175 1.97996e-06
AAA5 0.01334 2.14159e-05
AAA5 0.01340 4.12155e-05
AAA5 0.01496 1.10312e-05
AAA5 0.51401 0.0175308
BB0 0.00204 2.8825e-07
BB0 0.01569 7.94746e-07
BB0... (6 Replies)
Discussion started by: f_o_555
6 Replies
9. Shell Programming and Scripting
Hello.
I face this (2 side) problem.
Some lines with this structure.
...........
12345678 4
12345989 13
12346356 205
12346644 74
12346819 22
.........
The first field (timestamp) is growing (or at least equal).
1)Sum the second fields if the first_field/500 are... (8 Replies)
Discussion started by: paolfili
8 Replies
10. Shell Programming and Scripting
Hi,
I have a file and I want to sum all the numbers in it.
Example of the file:
0.6714359
-3842.59553830551
I used your forum (https://www.unix.com/shell-programming-scripting/74293-how-get-sum-all-lines-file.html) and found a script, what worked for me:
awk '{a+=$0}END{print a}'... (8 Replies)
Discussion started by: mario8eren
8 Replies