Skip to content

Instantly share code, notes, and snippets.

@riansanderson
Created August 4, 2015 23:56
Show Gist options
  • Select an option

  • Save riansanderson/7283379d6717feb6e92f to your computer and use it in GitHub Desktop.

Select an option

Save riansanderson/7283379d6717feb6e92f to your computer and use it in GitHub Desktop.
Sensors at the command line
# change permissions for several input event devices
cat /proc/bus/input/devices | awk '/sim-/,/event/ {d=$1; if (/N:/) {split($2,n,"=")}; if(/event/) {split($2,e,"="); print e[2] "\t" n[2]; system("sudo chmod a+rw /dev/input/" e[2])}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment