I have to extract the values which are greater than or equal to 0.01 from column number 6 of tab-delimited file(My files contain more than 6 columns). I had tried with following code
for i in $(find ./ `pwd` -name "BC_4_*_*shift.txt" ); do
awk -F"\t" 'NR==1 || $6>=0.01' $i > $i"_"ctdna_freq.txt;
done
to write this code I had taken help from get all rows having a column value greater than a threshold, Using this code I am able extract values from 6th column which are greater than 0.01 but I am not able to extract the values which are equal to 0.01 following is my input file
chr pos ref var p.val freq.var
chr19 9074573 A C 6.73E-22 0.586593469
chr19 9091288 G T 5.96E-188 0.508732726
chr8 124518636 C T 9.55E-21 0.00005
chr12 56490398 G T 0.005271732 0.010003218
chr12 56477619 G A 1.40E-15 0.010001069
chr12 56477619 G A 1.40E-15 0.010001069
chr3 52677261 C T 5.13E-06 0.01
chr5 67591010 A G 4.82E-23 0.01
Expected output
chr pos ref var p.val freq.var
chr19 9074573 A C 6.73E-22 0.586593469
chr19 9091288 G T 5.96E-188 0.508732726
chr12 56490398 G T 0.005271732 0.010003218
chr12 56477619 G A 1.40E-15 0.010001069
chr12 56477619 G A 1.40E-15 0.010001069
chr3 52677261 C T 5.13E-06 0.01
chr5 67591010 A G 4.82E-23 0.01
awkworks fine for me, outputting lines with 0.01, maybe break it down (remove for loop etc., so try to reproduce the issue with a minimal script, sth likeawk 'NR==1 || $6>=0.01' fileawk 'NR==1 || $6>=0.0099'