Script calculate

This commit is contained in:
Andros Fenollosa 2019-10-31 17:44:48 +01:00 committed by GitHub
parent 5cff50d1d9
commit 63f74932c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
calcular-porcentaje.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
CSV="resources/top-1m.csv"
NUM_WORDPRESS=$(cat $CSV | grep ,true$ | wc -l)
NUM_NOT_WORDPRESS=$(cat $CSV | grep ,false$ | wc -l)
NUM_TIMEOUT=$(cat $CSV | grep ,timeout$ | wc -l)
TOTAL=$(cat $CSV | wc -l)
echo "($NUM_WORDPRESS * 100) / ($TOTAL - $NUM_TIMEOUT)" | bc