Skip to content

Instantly share code, notes, and snippets.

@vkoloss
Last active October 5, 2016 19:59
Show Gist options
  • Save vkoloss/5a9d35baae8c42418afed46e50ec241d to your computer and use it in GitHub Desktop.
Save vkoloss/5a9d35baae8c42418afed46e50ec241d to your computer and use it in GitHub Desktop.
#!/bin/bash
jtl="file.jtl"
total=$(wc -l < $jtl)
let "total -= 1"
for i in $(cut -f 4 -d , $jtl | sort | uniq | egrep "[0-9]")
do
count=$(cut -f 4 -d , $jtl | grep $i | wc -l)
rate=$(echo "scale=2; 100 * $count / $total" | bc)
echo "$i $count $rate"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment