comparison filterinfo/filterinfo.sh @ 1:ce6806e0539f draft

Uploaded
author jshay
date Thu, 15 Aug 2019 16:18:59 -0400
parents e40ccd3eab44
children
comparison
equal deleted inserted replaced
0:e40ccd3eab44 1:ce6806e0539f
35 else 35 else
36 if [ -z "$divideby" ]; then 36 if [ -z "$divideby" ]; then
37 divideby=4 37 divideby=4
38 fi 38 fi
39 # print % reads passing filter to an outfile 39 # print % reads passing filter to an outfile
40 if [[ $FILTERED == *.gz ]]; then 40 if [ $(file $FILTERED | awk '{print $2}') == "gzip" ]; then
41 pass=$(gunzip -c $FILTERED | wc -l | awk '{print $1}') 41 pass=$(gunzip -c $FILTERED | wc -l | awk '{print $1}')
42 else 42 else
43 pass=$(wc -l $FILTERED | awk '{print $1}') 43 pass=$(wc -l $FILTERED | awk '{print $1}')
44 fi 44 fi
45 pass=$(expr $pass / $divideby) 45 pass=$(expr $pass / $divideby)
46 if [[ $FULL == *.gz ]]; then 46 if [ $(file $FULL | awk '{print $2}') == "gzip" ]; then
47 total=$(gunzip -c $FULL | wc -l | awk '{print $1}') 47 total=$(gunzip -c $FULL | wc -l | awk '{print $1}')
48 else 48 else
49 total=$(wc -l $FULL | awk '{print $1}') 49 total=$(wc -l $FULL | awk '{print $1}')
50 fi 50 fi
51 total=$(expr $total / $divideby) 51 total=$(expr $total / $divideby)