Created
May 17, 2019 22:03
-
-
Save erev0s/873b3c878398414e34888b4109023ee9 to your computer and use it in GitHub Desktop.
extract clean cpu and ram statistics from firebase after copying them manually from the source of the page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sed "s/<tr>//g" < $1 | sed "s/<\/tr>//g" | sed "s/<td>//g" | sed "s/<\/td>//g" | sed '/^[[:space:]]*$/d' | sed "s/<tbody>//g" | sed "s/<\/tbody>//g" | tr -d '[:blank:]' | sed -r '/^.{,3}$/d' | awk -F, 'length($1) < 8 { print f; print} {f=$1}' | sed "s/00://g" | tail -n +3 > tmp | |
awk 'NR % 2 == 1' tmp > times.txt | |
awk 'NR % 2 == 0' tmp > values.txt | |
rm tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment