Created
March 23, 2018 20:21
-
-
Save thisdavej/cd1a68dae52f54241738125906283c81 to your computer and use it in GitHub Desktop.
Process a log file and count the number of times different types of buttons were pressed for an IoT project. How would you accomplish?
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
# Count number of distinct times each button type pressed | |
cat button-presses.log | cut -d "|" -f 2 | sort | uniq -c | |
# Results | |
# 5 circuit board | |
# 12 dash button | |
# 3 web |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment