## How to print values that are greater than 0.1 in at least 80% of the samples?

How to print values that are greater than 0.1 in at least 80% of the samples?
# 1
02-17-2015
How to print values that are greater than 0.1 in at least 80% of the samples?

input
output
Tried
I tried sth that able to print values that are greater than 0.1
 quincyjones View Public Profile for quincyjones Find all posts by quincyjones
# 2
02-17-2015
 Corona688 View Public Profile for Corona688 Visit Corona688's homepage! Find all posts by Corona688
# 3
02-17-2015
@corona688: it is just printing the header. I think something is wrong ?
 quincyjones View Public Profile for quincyjones Find all posts by quincyjones
# 4
02-17-2015
Try Please be aware that the header is printed "by sheer coincidence". To make it print safely, add sth like NR==1; or so...

@Corona688: I'm not sure I get your logics. Could you explain?

Last edited by RudiC; 02-17-2015 at 01:10 PM.. Reason: Removed my silly question to Corona688
 RudiC View Public Profile for RudiC Find all posts by RudiC
# 5
02-17-2015
Hello quincyjones,

Could you please try following and let me know if this helps.(Little addition to Corona's code)
Output will be as follows.
Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
 RavinderSingh13 View Public Profile for RavinderSingh13 Find all posts by RavinderSingh13
# 6
02-17-2015
Rats! I didn't read the title ... be back soon ...

---------- Post updated at 17:06 ---------- Previous update was at 16:57 ----------

... adapting Corona688's proposal slightly (as there are 10 date fields but 11 in total; and the request was "at least 80%"):

Last edited by RudiC; 02-17-2015 at 01:13 PM..
 RudiC View Public Profile for RudiC Find all posts by RudiC
# 7
02-17-2015
Thank you all. it's working great. However could someone please explain the logic behind
Quote:
if (T>NF*0.8)
.
 quincyjones View Public Profile for quincyjones Find all posts by quincyjones

## How to replace the field values, which are greater than the specified value with TRUE?

I have a csv file as given below, org1 org2 org3 org4 org5 gene1 100 80 90 80 150 gene2 30 70 50 50 115 gene3 40 120 60 40 105 gene4 20 72 40 60 20 I need to replace the fields are having values greater than 100 with "TRUE". I used the following commands to replace...

## EX300 - Samples Needed

May i have some samples of EX300 exam cert.? pls help ---------- Post updated at 01:12 AM ---------- Previous update was at 12:52 AM ---------- Who can share new RHCE V7 EX300 exam dumps/EX300 exam questions? ---------- Post updated at 03:48 AM ---------- Previous update was at 01:12...

## Calculating mean for samples 1-3 4-6 etc.

Hi. I have a LOOONG list of samples but I am not sure how to write the loop/script to calculate the mean... I normally use awk... ...................MEAN Sample1 25.82 40.61333 Sample1 47.6 Sample1 48.42 Sample2 54.03 54.12 Sample2 53.98 Sample2 54.35 etc..... I would like to...

## Help me to find a greater than or smaller than values

Hi, i need to find one of the value from my file is in between two numbers, that is the value is greater than 34 and smaller than 50, Ex: File.txt col1 col2 col3 col4 1 Name1 93 w 2 Name2 94 a 3 Name3 32 b 4 Name4 45 x 5 Name5 50 y 6 Name6 49 z here i need to find col3 values are...

## awk to get values greater than

data.txt August 09 17:16 2013 August 09 17:17 2013 August 09 17:19 2013 August 09 17:20 2013 August 09 17:21 2013 August 09 17:22 2013 August 09 17:23 2013 August 09 17:24 2013 to print from a point in this file, to the end of the file, i type: awk '/August 09 17:22/,0' data.txt. ...

## Compare values in two files. For matching rows print corresponding values from File 1 in File2.

- I have two files (File 1 and File 2) and the contents of the files are mentioned below. - I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2. - I tried to modify and use...

## AWK/SED print if 2nd character in a column is greater than 0

We have an access log where column 8 displays the time in seconds like below: Tj8nQAoNgwsAABov9cIAAAFL - 10.13.131.80 - - (0) - "GET /aaaaa/bbbb/bbbb where column 8 is printed (0). We are trying to find how many entries are there that has column 8 greater than 0. Remember \$8 is (0) and not...

## Problem with awk,not able print the file that is greater than 3000 bytes.

My Script: #!/bin/sh date=`date +%y%m%d -d"1 day ago"` in_dir=/vis/logfiles/to_solmis cp `grep -il ST~856~ \$inbound_dir/*\$date*` /vis/sumit/in_ASN/ for i in /vis/sumit/in_ASN/* do mkdir -p /vis/sumit/inboundasns.\$date cp `echo \$i`...

## Print lines which are greater than

I have a file which has a list of titles and then 14 lines afterwards. I need to find the 1 through 14 lines which are greater than 15k and print the title and the line which matched. Sample before: ABC.CDE.NORTH.NET 1:18427 2:302 3:15559 4:105 5:5 6:2 7:2 8:2 9:4 10:2 11:17 12:2...

## Finding absolute values greater than a certain value

Hi I am posting here for the first time. I am trying to write a script that reads a data file and tries to determine if any absolute values that are above 0.5 I was thinking it ought to be possible to do this with awk somehow. Are there any suggestions before I start reinventing the wheel? ...