- 论坛徽章:
- 0
|
不行,仍然抓不住。
my @result = $exp->expect($timeout,'#');
print "3.prematch=$result[3],match=$result[2].\n";
my $output = $exp->exp_before();
print "3.before=$output.\n";
下面是输出:
RP/0/RP0/CPU0:rwca-r-001#admin show environment tempera3.prematch=
RP/0/RP0/CPU0:rwca-r-001,match=#.
3.before=
RP/0/RP0/CPU0:rwca-r-001.tures
Thu Dec 5 15:05:24.215 ESDT
R/S/I Modules Inlet Exhaust Hotspot
Temperature Temperature Temperature
(deg C) (deg C) (deg C)
0/0/*
host 42, 38 32, 33 37, 40, 37,
36, 40, 40,
43, 59
好像在命令还没有执行完成的时候就开始抓数据了,但是这个时候#还没有出现。 我还用-re=>/#######/; 这样应该匹配失败,等20秒timeout, 但是脚本并没有等待就执行完了,貌似这个匹配根本就没起作用。 |
|