|
#1
|
|||
|
|||
![]()
Support me with some problem that i have. We are performed an audit logs but, is there a form to get some specific values in a table?
We have detected 2 different tables as below: Code:
TABLE 1: ==================================================================================================================================== FRU LNH BOARD ST FAULT OPER MAINT STAT PRODUCTNUMBER REV SERIAL DATE TEMP ===================================================================================================================================== BB-1 000100 DUS5301 1 OFF ON OFF ON KDU137848/11 R2B B441317340 20180407 (Bb6630) Code:
TABLE 2: SMN APN BOARD FAULT OPER MAINT STAT PRODUCTNUMBER REV SERIAL DATE TEMP COREMGR ==================================================================================================================== 0 1 DUW4101 OFF ON OFF OFF KDU127174/4 R2F TU8XAW5590 20160726 68C Active* -------------------------------------------------------------------------------------------------------------------- Please, if you can give me an advice or support, provide your feedback. Last edited by jdev; 08-06-2018 at 10:20 AM. |
#2
|
|||
|
|||
Hi cekoj,
What version of SecureCRT are you using? On what OS/platform? Please review the scripting manual here. In Chapter 4, it contains info on Reading Data from Remote Machines.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
This is Version 7.0.4 (x64 build 537)
Actually i tried using the manual but i'm still with problems because only i got one value and the others are not working. I'd like to know how you structure your scripts for this kind of request |
#4
|
|||
|
|||
Hi cekoj,
That's a really old version of SecureCRT. Please elaborate on what you mean by "only got one value". Since there is an inconsistent amount of spaces *separating* the data you wish to get, you will have to look for other ways to isolate what you need. Is there a consistent number of characters (and spaces) for all four fields taken together? (In other words, could you get 50 characters in the line each time and then split it on the spaces and trim the results?) If not, is there a pattern to each field so you can isolate each one? (Is there always a "/" in Product Number? Is "R2" always found in Rev? Is the Serial a consistent number of alphanumeric characters? Is the Date consistently YYYYMMDD?)
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
Remove all the excess spaces and then split by space to put each item in an array.
Start by reading the line into a variable. Code:
input = crt.Screen.Readstring (vbCr) Code:
Do While InStr(1,input," ") 'loop while there are more than just single spaces input = Replace(input," "," ") 'replaces double spaces with a single space Loop Code:
arroutput = Split (input," ") 'splits the info using a space as a delimiter
__________________
Version 6.7.3 (build 292) |
#6
|
|||
|
|||
Thanks for your analysis. I got to add in my script in order to read all sites and configure properly.
|
![]() |
Tags |
columns , script , table |
Thread Tools | |
Display Modes | Rate This Thread |
|
|