#/bin/shusb_num=$(cat /proc/scsi/scsi | grep "Vendor" | wc -l)if [ $usb_num = 2 ];then echo "test usb success"else echo "test usb failed"fi判断USB接口是否有设备插入,usb_num为检查到的USB设备个数。
#/bin/shusb_num=$(cat /proc/scsi/scsi | grep "Vendor" | wc -l)if [ $usb_num = 2 ];then echo "test usb success"else echo "test usb failed"fi