Created
November 18, 2020 12:20
-
-
Save Kyu/eae1553d742b866cc11007f72a3ec3c7 to your computer and use it in GitHub Desktop.
Gets most talkative users from whatsapp archive
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
#!/usr/bin/bash | |
cat _chat.txt | sed "s|[[0-9 / , :]*][[:space:]]||" | grep -o ".*:" | sed 's/:.*//g' | tr -cd '[:print:]\r\n\t' | grep -v "^\s*$" | sort | uniq -c | sort -bnr | |
# cat file | replace [date/date/date , , , ] with "" | get everything before ":" | GET EVERYTHING BEFORE FIRST ":" | filter out non printing chars | idk tbh something to do with the count | idk I should man this | sorting ?? idk i shsould man this | |
# prints out most talkative in chat, w some false pos | |
# https://unix.stackexchange.com/a/39044/427069 -- sort - Get text-file word occurrence count of all words & print output sorted | |
# https://stackoverflow.com/a/3540639/3875151 -- bash - Removing non-displaying characters from a file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment