From: <Tin...@Te...> - 2002-04-17 01:46:02
|
Hi, I am seeing a bunch of extra characters inserted between the command I sent. I sent 'copy startup to bootflash:lab-baseline.conf\n', but the string used in matching is: ---- Does `copy \033[?25l\rlab1nnisaa02.lab# copy \015\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C \033[C' Can anyone help explain this Below is the Expect.pm debug output. Thanks. Sending 'copy startup to bootflash:lab-baseline.conf\n' to spawn id(3) Expect::print('Expect=GLOB(0x835d620)', 'copy startup to bootflash:lab-baseline.conf^J') called at first.pl line 34 Starting EXPECT pattern matching... Expect::expect('Expect=GLOB(0x835d620)', 5, 'ARRAY(0x836a338)', '# ') called at first.pl line 38 spawn id(3): list of patterns: #1: -re `.*no.*? ' #2: -ex `# ' spawn id(3): Does `' match: pattern #1: -re `.*no.*? '? No. pattern #2: -ex `# '? No. Waiting for new data (5 seconds)... lab1nnisaa02.lab# copy spawn id(3): Does `copy \033[?25l\rlab1nnisaa02.lab# copy \015\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C \033[C' match: pattern #1: -re `.*no.*? '? No. pattern #2: -ex `# '? YES!! Before match string: `copy \033[?25l\rlab1nnisaa02.lab' Match string: `# ' After match string: `copy \r\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\033[C\0 33[C' Matchlist: () Returning from expect successfully. Sending 'exit\nexit\012' to spawn id(3) Expect::print('Expect=GLOB(0x835d620)', 'exit^Jexit^J') called at first.pl line 41 lab1nnisaa02.lab# copy startup to bootflash:lab-baseline.conf Are you sure you want to overwrite /int-flash/cfg/lab-baseline.conf [no]? exit lab1nnisaa02.lab# exit |