Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement