Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-10-2015, 10:22 PM
Symmetry Symmetry is offline
Registered User
 
Join Date: Aug 2012
Posts: 2
Wildcards and WaitForString

I am trying to write a generic check script to run on an already established connection to a Juniper router. The command prompt while on the router looks this this "USERNAME@DEVICE_NAME>".

The user name will be a constant as well as the @ and >. I tried using wildcards to make the device name not relevant. It doesn't work though. Is there a way to make the device name portion of the prompt dynamic?
Reply With Quote
  #2  
Old 07-13-2015, 08:05 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,020
Hello Symmetry,

What version of SecureCRT are you using? On what OS?

Is the session name the same as DEVICE_NAME?

Or is the hostname used for the connection the same as DEVICE_NAME?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 07-15-2015, 08:40 AM
Symmetry Symmetry is offline
Registered User
 
Join Date: Aug 2012
Posts: 2
I am using SecureCRT 7.3.3 (x64 build 779) on a Windows 7 Pro 64-bit laptop.

The session name may or may not be the same as the prompt. If making it the same is a requirement that isn't a big deal. Most of these device I am connected with use an IP address and not DNS. This is why I was trying to go with a wildcard approach.
Reply With Quote
  #4  
Old 07-15-2015, 09:53 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,020
Hi Symmetry,

Thanks for the clarification. See the example script posted here.

There's a snippet of code (starting at line 181) that illustrates how you might detect a prompt.

There is not really a wildcard approach as far as I know that you can use, but you would instead want to detect each one and this code can be applicable to multiple sessions.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730

Last edited by jdev; 11-09-2017 at 12:25 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:15 AM.