Mercurial > repos > jshay > filterinfo
changeset 1:ce6806e0539f draft
Uploaded
author | jshay |
---|---|
date | Thu, 15 Aug 2019 16:18:59 -0400 |
parents | e40ccd3eab44 |
children | f1ee529ae710 |
files | filterinfo/filterinfo.sh filterinfo/test |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/filterinfo/filterinfo.sh Tue Aug 13 15:34:03 2019 -0400 +++ b/filterinfo/filterinfo.sh Thu Aug 15 16:18:59 2019 -0400 @@ -37,13 +37,13 @@ divideby=4 fi # print % reads passing filter to an outfile - if [[ $FILTERED == *.gz ]]; then + if [ $(file $FILTERED | awk '{print $2}') == "gzip" ]; then pass=$(gunzip -c $FILTERED | wc -l | awk '{print $1}') else pass=$(wc -l $FILTERED | awk '{print $1}') fi pass=$(expr $pass / $divideby) - if [[ $FULL == *.gz ]]; then + if [ $(file $FULL | awk '{print $2}') == "gzip" ]; then total=$(gunzip -c $FULL | wc -l | awk '{print $1}') else total=$(wc -l $FULL | awk '{print $1}')