blob: e105955f5ae1aed1df2839baef9fe1034620d6aa [file]
#!/bin/sh
# Safely extracts the USB topology string for udev.
# Input Example: platform-1e6a3000.usb-usb-0:1.2.2.1:1.0
# Output Example: 1_2_2_1
if [ -z "$1" ]; then
exit 1
fi
echo "$1" | cut -d: -f2 | tr -d '.'