如何打印文本文件,直到它与字符串匹配。
考虑以下文本文件:
00:d7:8f:0a:86:5c ST0123-AP22 Joined Flexconnect Manual No
00:d7:8f:1e:d6:18 ST0123-AP14 Joined Flexconnect Manual No
00:d7:8f:1e:dd:50 ST0123-AP03 Joined Flexconnect Manual No
Efficient AP Image Upgrade ..... Enabled
Group Radius/Local Auth Parameters :
Radius Retransmit Count......................... 3 (default)
Active Radius Timeout........................... 5 (default)
Group Radius AP Settings:
AP RADIUS server............ Disabled
EAP-FAST Auth............... Disabled
LEAP Auth................... Disabled
EAP-TLS Auth................ Disabled
EAP-TLS CERT Download....... Disabled
PEAP Auth................... Disabled
我想打印直到字符串“Efficient AP Image Upgrade ..... Enabled”的行:问题是行数因每个输出而异。
我也尝试过 readlines 和 ttried for loop 但无法实现目标。
九州编程
相关分类