View Single Post
Old 05-06-2015, 03:58 PM
emexy emexy is offline
Registered User
Join Date: May 2015
Posts: 7
When i run the script to excute the following command

the output is given as

hostname>sh vlans
vlanteachers 2178
vlanstudents 2129


I am trying to retrieve for each line of output only the first part which is the vlan name and i need this only to be written to the log file. I Have tried using Split() but that didn't work.

Also is there a way to filter out that last entry {master:0} or sometimes its can be {master:1} from been written to the log file

I made changes to the following line which didn't work
nRow = g_objNewTab.Screen.CurrentRow
                strPrompt = g_objNewTab.screen.Get(nRow, _
                                           0, _
                                           nRow, _
                                           g_objNewTab.Screen.CurrentColumn - 1)
                strPrompt = Trim(strPrompt)
				split_strPrompt = Split(strPrompt, " ")
				For mytokenIndex = 0 To UBound(split_strPrompt) - 1
				strPrompt = split_strPrompt(1)
before it gets called here
Dim strResult
                    strResult = g_objNewTab.Screen.ReadString(strPrompt)

Last edited by emexy; 05-06-2015 at 04:05 PM.
Reply With Quote