core: 修复 wmic 换行符不是 \r\n 而是 \r\r\n 导致无法正确解析数据
Some checks are pending
运行主程序 / 运行主程序 (./reinstall.bat --debug --password 123@@@, windows-latest) (push) Waiting to run
运行主程序 / 运行主程序 (sudo bash reinstall.sh --debug --password 123@@@, ubuntu-latest) (push) Waiting to run
同步到 Gitlab / 同步到 Gitlab (push) Waiting to run
同步到 Gitlab CN / 同步到 Gitlab CN (push) Waiting to run

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() {