Last active
April 20, 2020 09:22
-
-
Save k1dbl4ck/d79d50709b34f71c88fe6e1a55e46fd4 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
RESULT="" | |
if [ -p /dev/stdin ]; then | |
while read -ra line ; do | |
if [[ $line[0] == *"[90m/"* ]]; then | |
unset 'line[0]' | |
ROW=$(echo "${line[*]}" | tr "(\n)" " ") | |
RESULT="$RESULT$ROW\n" | |
fi | |
done | |
echo "$RESULT" | sort | uniq -c | |
echo "---------------------------------------------------------" | |
echo "$RESULT" | sort | uniq -c | awk '{SUM+=$1}END{print SUM}' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment