core: 修复 wmic 换行符不是 \r\n 而是 \r\r\n 导致无法正确解析数据

This commit is contained in:
bin456789 2025-03-26 23:25:07 +08:00
parent 2a8e760b97
commit 4f54703e3b
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -2164,7 +2164,9 @@ to_lower() {
}
del_cr() {
sed 's/\r$//'
# wmic/reg 换行符是 \r\r\n
# wmic nicconfig where InterfaceIndex=$id get MACAddress,IPAddress,IPSubnet,DefaultIPGateway | hexdump -c
sed 's/\r+$//'
}
del_empty_lines() {