#!/bin/bash cat output.txt | awk '{print (($7 + $8 + $9)/($7 + $8 + $6))*100;}' > clear.txt avg=$(numaverage clear.txt) srr_matching=$(grep -x "0" clear.txt | wc -l) all=$(cat clear.txt | wc -l) echo "$srr_matching" echo "$all" srr=$(echo "$srr_matching/$all" | bc -l) echo "Avg WER: $avg" >> clear.txt echo "SRR: 0$srr" >> clear.txt