View Single Post
  #3  
Old 09-22-2015, 01:38 PM
jbd1300 jbd1300 is offline
Registered User
 
Join Date: Dec 2014
Posts: 18
User input manipulation

Thank you for that information. I believe I'm able to write intermediate scripts with reg-ex's now!..

root@router> show interfaces diagnostics optics xe-5/0/0 | match "r +:"
Laser output power : 1.0000 mW / 0.00 dBm
Receiver signal average optical power : 1.1059 mW / 0.44 dBm

crt.Screen.Send "show interface diagnostic optics " & strLine & " | match "r +:" " & vbcr

I want to look at just power levels by appending "r +:" to the end of the command, and it errors out.

Microsoft VBScript compilation error

I figured out it's this command, and it doesn't like the second pair of double quotes....

This is my current code where it errors out....
crt.Screen.Send "show interface diagnostic optics " & strLine & " | match "r +:" " & vbcr

I tried single quotes, but JUNOS doesn't like it...

rt.Screen.Send "show interface diagnostic optics " & strLine & " | match 'r +:' " & vbcr

root@router> show interfaces diagnostics optics xe-0/2/0 | match 'r +:'
^
syntax error.

Is there any way to have 2 sets of double quotes in a string?

Thanks

jbd1300