1)I need to calculate $5 total based on if ($1 $3) are same ..
2) also if ($1 $2 )for those are not unique mark them as "shared" but also total up "shared" numbers for which ( $1 $3) are same
like
Code:
cll_0014_spp,uranus,45 ( shared) --> ($1 $3) appears only once and had a non unique ( $1 $2) so shared
cll_0014_spp,pluto,11(shared) --> ( $1 $3 ) appears 3 times and in 2 of those ( $1 $2 ) is not unique so its shared and gets added up
cll_0014_spp,pluto,19 --> the rest of ($1 $3) with unique ($1 $2) gets added up
cll_0014_spp,neptune,61(shared) --> ($1 $3) appear 3 times with 2 of them have non unique ($1 $2) and get added up to 61
cll_0014_spp,neptune,59 --> the remaining ( $1 $3) with unique ($1 $2)
and so on ..
thx
i dont understand exactly but i try some code for your request ,
i hope this help you
Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Hi all,
I have created a script which adding two columns and removing two columns for all files.
Filename: Cust_information_1200_201010.txt
Source Data:
"1","Cust information","123","106001","street","1-203 high street"
"1","Cust information","124","105001","street","1-203 high street"
... (0 Replies)
Hello everyone,
I searched the forum looking for answers to this but I could not pinpoint exactly what I need as I keep having trouble.
I have many files each having two columns and hundreds of rows.
first column is a string (can have many words) and the second column is a number.The files are... (5 Replies)
Hi Friends,
I have come across some files where some of the columns don not have data.
Key, Data1,Data2,Data3,Data4,Data5
A,5,6,,10,,
A,3,4,,3,,
B,1,,4,5,,
B,2,,3,4,,
If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Hi all, I'm pretty much a newbie to UNIX. I would appreciate any help with UNIX coding on comparing two large csv files (greater than 10 GB in size), and output a file with matching columns.
I want to compare file1 and file2 by 'id' and 'chain' columns, then extract exact matching rows'... (5 Replies)
HI All,
I'm embedding SQL query in Script which gives following output:
Assignee Group Total
ABC Group1 17
PQR Group2 5
PQR Group3 6
XYZ Group1 10
XYZ Group3 5
I have saved the above output in a file.
How do i sum up the contents of this output so as to get following output:
... (4 Replies)