Advertisement
mstranieri

Load USB

Mar 26th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. #!/bin/bash
  2. for dev in /sys/bus/usb/devices/*-*:*
  3. do
  4.   if [ -f $dev/bInterfaceClass ]
  5.   then
  6.     if [[ "$(cat $dev/bInterfaceClass)" == "03" && "$(cat $dev/bInterfaceProtocol)" == "01" ]]
  7.     then
  8.       echo "Keyboard detected: $dev"
  9.     fi
  10.   fi
  11. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement