![在 Expect 中从 txt 文件发送一堆命令](https://linux22.com/image/196841/%E5%9C%A8%20Expect%20%E4%B8%AD%E4%BB%8E%20txt%20%E6%96%87%E4%BB%B6%E5%8F%91%E9%80%81%E4%B8%80%E5%A0%86%E5%91%BD%E4%BB%A4.png)
如何从 txt 文件向 Cisco 路由器发送一堆命令,例如:
configure
class-map match-any popc_fiberpower004_booster_v4
match access-group ipv4 bng_permit_v4
match access-group ipv6 bng_permit_v6
end-class-map
policy-map popc_fiberpower004_booster_v4_in
class popc_fiberpower004_booster_v4
police rate 110 mbps
set dscp 0
class class-default
end-policy-map
当然还有通过 telnet 的 Expect 脚本。预先感谢您的帮助。