标签:vendor tps grep lan lang href targe baidu 个数
#/bin/sh
判断USB接口是否有设备插入,usb_num为检查到的USB设备个数。
usb_num=$(cat /proc/scsi/scsi | grep "Vendor" | wc -l)
if [ $usb_num = 2 ];then
echo "test usb success"
else
echo "test usb failed"
fi
标签:vendor tps grep lan lang href targe baidu 个数
原文地址:https://www.cnblogs.com/codeking100/p/10344074.html