I am trying to read the contents of a memory map dump of learned unicast entries. Since the memory chunk is 1 million entries, I created an expect script to loop through the retreivals in 10,000 entry chunks. What I want to do is "read" this output into a file for post processing. I'm looking for help on "expecting" the output when the output from each "chunk" can be 10,000 lines.
here is a snipit of my loop:
set timeout 120
set beginIndex 0
for {set index 10000} {$index <= 1000000} { set index [expr {$index + 10000}] } {
cli_snd "mac-dram-print"
cli_rcv "Enter Start index:"
cli_snd "$beginIndex"
cli_rcv "Enter End Index:"
cli_snd "$index"
cli_rcv "Learning Database:"
cli_snd "2"
# Here is where I want to catch each of the 10,000 lines of data and add them to a file.
cli_rcv "psmon.iss.npapi"
set beginIndex [expr { $beginIndex + 10000 } ]
}
Any thoughts?
here is a snipit of my loop:
set timeout 120
set beginIndex 0
for {set index 10000} {$index <= 1000000} { set index [expr {$index + 10000}] } {
cli_snd "mac-dram-print"
cli_rcv "Enter Start index:"
cli_snd "$beginIndex"
cli_rcv "Enter End Index:"
cli_snd "$index"
cli_rcv "Learning Database:"
cli_snd "2"
# Here is where I want to catch each of the 10,000 lines of data and add them to a file.
cli_rcv "psmon.iss.npapi"
set beginIndex [expr { $beginIndex + 10000 } ]
}
Any thoughts?