|
|
|||||||
Hi, Im trying to use Instr and Split command to capture the retured value of "Name" in the bellow "nbtstat -c" output. I cannot make it work Anybody knows how to do??? Name Type Host Address Life [sec] ------------------------------------------------------------ CyrusA <20> UNIQUE 192.168.0.33 502 LOTR1 <03> UNIQUE 192.168.0.33 600 Simply i need $UserID = CyrusA and $Computer = LOTR1 note there is blank space between each string. BR /C |
||||||||
|
|
|||||||
Code: break on |
||||||||
|
|
|||||||
There can be more than one entry in these results, but the easiest way to get the first part of the line is: Code: $name = split($line, chr(32))[0] |
||||||||
|
|
|||||||
The Computer name in secound row "LOTR1" - Can I get that value in the same script? Thanx |
||||||||
|
|
|||||||
Rad's previous post would handle multiple lines. |