在同一目录建立IPMI列表文件ipmi.txt,然后执行:sh sntoip.sh ipmi.txt
#!/bin/bashuser=prompasswd=Linux@web7while read linedoserial=$(ipmitool -H $line -I lanplus -U $user -P $passwd fru | grep "Product Serial")prom=$(ipmitool -H $line -I lanplus -U $user -P $passwd user list | grep "prom" )yunwei=$(ipmitool -H $line -I lanplus -U $user -P $passwd user list | grep "yunwei" )admin=$(ipmitool -H $line -I lanplus -U $user -P $passwd user list | grep "admin" )echo $line $serial#echo $prom#echo $yunwei#echo $admindone <$1
