Each section (AAAAA or BBBBB) is one line of data, making 32 columns of data in a single line. I need to sum up the 29th-31st columns in each line, preserving the 1st column, while ignoring those which contain -9.99, and ignoring "B".
Hi All,
I have a file like -
num.txt
12, 34, 65, line1
34, 65, 89, line2
43, 65, 77, line3
I want to do two things -
1. Add first three columns of each line and print the line with largest value.
i.e. (12+34+65) for 1st line and so on.
2. Add middle column of each line i.e.... (3 Replies)
Hey,
I am gettin a bit crazy with my script. I have several input datas with the same name (5.ill) in different folders (daysim_01, daysim_02, etc.). The 4. column of each of the data has to be summed with each other and then hass to be written in one new file.
So file1:
1 1 0 1
2 1 1 2 ... (7 Replies)
Basically I have to process a text file which has been sorted this way:
John 12
John 13
John 10
John 900
Peter 20
Peter 30
Peter 32
The first column is a name, and the second an arbitrary value, both delimited by a space. How can I sum them up such that it would become:
John 935... (2 Replies)
Hi friends, lets assume that I have lines of data as follows
rico 12 bct 58
pot 65 vft 41
dek 45 kbt 13
her 35 ubr 14
. . . .
. . . .
. . . .
I want to calculate the sum of the numbers at the 2. row of each... (6 Replies)
My file is something like this :
03.097
03.094
03.093
03.095
03.091
04.089
06.093
07.225
08.196
06.097
06.094
05.096
04.086
I'd like to sum it from a given line to another one , e.g.: from line 10 until line 20
What s the awk way solving this ? (1 Reply)
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:
Hi guys, i'm a new guy here, and it's my first time creating a unix script.
can you guys help me out here? i'd... (3 Replies)
1. The problem statement, all variables and given/known data:
Hi guys, i'm a new guy here, and it's my first time creating a unix script.
can you guys help me out here? i'd really appreciate it. :(
Here's my problem:
This is the file i'm using, it has 6 columns, the first three columns are... (12 Replies)
a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii
a thru ii are digits and strings....
The awk needed....if coloumn 9 == i (coloumn 9 is string ), output the sum of x's(coloumn 22 ) in all records and sum of y's (coloumn 23 ) in all records in a file (records.txt).... (6 Replies)