10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk below I am trying to get the average of the sum of $7 if the string in $4 matches in the line below it. The --- in the desired out is not needed, it is just to illustrate the calculation. The awk executes and produces the current out. I am not sure why the middle line is skipped and the... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
Im looking for a way to average the values in field 14 (when field 2 is equal to 2016) and fields 3 and 4 (when field 2 is equal to 2017).
Any help is appreciated.
001001 2016 33.22 38.19 48.07 51.75 59.77 67.68 70.86 72.21 66.92 53.67 42.31 40.15
001001 2017 ... (10 Replies)
Discussion started by: ncwxpanther
10 Replies
3. Shell Programming and Scripting
In the below I am trying to use awk to match all the $13 values in input, which is tab-delimited,
that are in $1 of gene which is just a single column of text.
However only the line with the greatest $9 value in input needs to be printed.
So in the example below all the MECP2 and LTBP1... (0 Replies)
Discussion started by: cmccabe
0 Replies
4. Shell Programming and Scripting
Trying to output a result that uses the data from file to combine and subtract specific lines. If $4 matches in each line then the last $6 value is added to $2 and that becomes the new$3. Each matching line in combined into one with $1 then the original $2 then the new$3 then $5. For the cases... (4 Replies)
Discussion started by: cmccabe
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
For example:
I have:
HostA,XYZ
HostB,XYZ
HostC,ABC
I would like the output to be:
HostA,HostB: XYZ
HostC:ABC
How can I achieve this?
So far what I though of is: (1 Reply)
Discussion started by: alvinoo
1 Replies
6. Shell Programming and Scripting
I have the following file
299899 chrX_299716_300082 196 78.2903 299991 chrX_299982_300000 18.2538 Tajd:0.745591 FayWu:-0.245701 T2:1.45
299899 chrX_299716_300082 196 78.2903 299991 chrX_299982_300000 18.2538 Tajd:0.745591 FayWu:-0.245701 T2:0.283
311027 chrX_310892_311162 300 91.6452... (2 Replies)
Discussion started by: jfern
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have table like
usrid Month Date year Time
w23da Feb 10 2014 12:42:34
ae3aw Feb 20 2014 12:47:02
zse3q Feb 09 2014 10:02:28
all the five fields are inserted into different columns
I want to combine all four (Month,Date,year and Time) and make it... (4 Replies)
Discussion started by: stew
4 Replies
8. Shell Programming and Scripting
Dear Experts,
Kindly help me please to get the average from column 14 and to write the value at the last field., But we need to take as reference the column 16., example the first 4 lines has the same value in column 16, therefore I want ot get the average only for these lines in column 14. And... (2 Replies)
Discussion started by: jiam912
2 Replies
9. Shell Programming and Scripting
Hi Friends,
I have many files like below.
total,0.7%,0.0%,0.2%,0.0%,0.2%,0.7%,98.0%
total,1.9%,0.0%,0.4%,0.0%,0.0%,6.8%,90.6%
total,0.9%,0.0%,0.4%,0.0%,0.0%,0.0%,98.5%
total,1.4%,0.0%,0.7%,0.0%,0.2%,2.9%,94.5%
total,0.7%,0.0%,0.4%,0.0%,0.0%,0.9%,97.7%... (13 Replies)
Discussion started by: SunilB2011
13 Replies
10. Shell Programming and Scripting
Hi everyone,
I have a program that generates logs that contains sections like this:
IMAGE INPUT
81 0 0.995 2449470 0 1726 368 1 0.0635 0.3291
82 0 1.001 2448013 0 1666 365 1 0.0649 0.3235
83 0 1.009 2444822 0 1697 371 1 ... (3 Replies)
Discussion started by: euval
3 Replies