#1
|
|||
|
|||
Grabbing a long list of data output from screen
Hi guys,
So am trying to grab a whole lot of output of a command from the command line. I am using crt.screen.send to punch the command on to the CLI and using a temporary text file to read each line. Here is what am doing, Quote:
The problem with this is that I can't read the lines after certain lines which in real time would require me to hit a spacebar. I am using vbcrlf to display all the output on the screen but am only able to grab the lines or output before I am giving the command "vbcrlf" for instance if have several lines as output, line1 line2 . . . . line30 Press any key to continue (Q to quit) This is where I am required to hit spacebar in real time when working with script. I gave several vbcrlf to overcome the challenge of hitting spacebar in the script. What am unable to do though is not able to grab the entire output all am getting is till Press any key to continue (Q to quit), although I can literally see the rest of the output being displayed on the screen. So it should be something like this (assuming am getting 60 lines on the screen), Quote:
Quote:
I may sound crazy, I hope I conveyed my point. Please correct my mistake and help me read all the output of this particular command. Thanks in advance! Yuvi |
#2
|
|||
|
|||
Hi Yuvi,
Thanks for the post. An example of how one could accomplish your goal is included in the scripting manual at the following location: https://www.vandyke.com/support/tips...ing/index.htmlThe example begins on page 50 with the heading of: Using MatchIndex to Determine Which String ReadString() Detected. Does this help you accomplish your goal? |
#3
|
|||
|
|||
Thanks for the reply rtb!
I tried that already, gave it another go, still I am unable to read all the data output of my command "show port" All this does is matching the index to the string where you need a space, gives a space and displays the whole data on to the screen. But, still unable to read the whole data. Here is what I did, (FYI, I am not working with CISCO, its Bastian, if that helps Quote:
Still it just reads the output till before "* indicates that the corresponding row element may have been truncated" I want he output till "symbol Errors" which is not happening. |
#4
|
|||
|
|||
Hi Yuvi,
What version of SecureCRT are you using? I don't have any familiarity with Bastian. Would you be able to post the output of the command? NOTICE: The requested troubleshooting data may include sensitive information (usernames, passwords, publicly-accessible host names or IP addresses, etc.). |
#5
|
||||
|
||||
In Cisco devices, "terminal length 0" stops the 'more' prompt.
Juniper: "set cli screen-length 0" Most router have a similar option. |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|