Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. # This creates a sorted single column list of commands which can be used with
  2. # vcgencmd.
  3.  
  4. # The output of vcgencmd commands is a single variable with commands separated
  5. # by commas.
  6. #
  7. # The cut command treats everything within the quotations as a single field and
  8. # prints that.
  9. #
  10. # The awk command is instructed to use ', ' as a record separator, then prints
  11. # each record.
  12. #
  13. # The sort command, does just that.
  14. #
  15. # The sed command deletes empty lines. For some reason awk creates an empty line
  16. # when it produces it's output.
  17.  
  18. vcgencmd commands | cut -f2 -d\" | awk '{ print $0 }' RS=', ' | sort | sed '/^$/d'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement