Created
June 29, 2018 10:21
-
-
Save danielhavir/6a549092a9872a61cb876e7ed69c8957 to your computer and use it in GitHub Desktop.
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
if [ $# -ne 2 ];then | |
echo "Usage: `basename $0` idVendor idProduct" | |
exit 1 | |
fi | |
for X in /sys/bus/usb/devices/*; do | |
if [ "$1" == "$(cat "$X/idVendor" 2>/dev/null)" -a "$2" == "$(cat "$X/idProduct" 2>/dev/null)" ] | |
then | |
echo "$X" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment