Created
January 19, 2017 16:18
-
-
Save hxmuller/0c33c0cf59eb7752eee529eceb4e501b to your computer and use it in GitHub Desktop.
create vcgencmd command list from Raspberry Pi
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
# This creates a sorted single column list of commands which can be used with | |
# vcgencmd. | |
# The output of vcgencmd commands is a single variable with commands separated | |
# by commas. | |
# | |
# The cut command treats everything within the quotations as a single field and | |
# prints that. | |
# | |
# The awk command is instructed to use ', ' as a record separator, then prints | |
# each record. | |
# | |
# The sort command, does just that. | |
# | |
# The sed command deletes empty lines. For some reason awk creates an empty line | |
# when it produces it's output. | |
vcgencmd commands | cut -f2 -d\" | awk '{ print $0 }' RS=', ' | sort | sed '/^$/d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment