From 6fce071426abdc20c7b9bc9afb1132447c2a9ccb Mon Sep 17 00:00:00 2001 From: leimingsheng Date: Thu, 26 Jun 2025 10:19:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(master=20:=20nicsensor)=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20parse=5Fnic=5Fslot=E6=97=A0=E6=B3=95=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E4=B8=A4=E4=BD=8D=E6=95=B0=E6=A7=BD=E4=BD=8D=E5=8F=B7=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nicsensor.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nicsensor.sh b/nicsensor.sh index 91844f2..198473c 100755 --- a/nicsensor.sh +++ b/nicsensor.sh @@ -252,10 +252,10 @@ parse_nic_slot(){ esac if [ $nic_type = "ocp" ];then - slot_number=$(echo $nic_slot | cut -c 4) + slot_number=$(echo $nic_slot | cut -b 4-) else if [ $fullname -eq 1 ];then - slot_number=$(echo $nic_slot | cut -c 5) + slot_number=$(echo $nic_slot | cut -b 5-) else slot_number=$nic_slot fi