Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[SRX] How to send quotation mark in the Secure CRT script

0

0

Article ID: KB18341 KB Last Updated: 24 Feb 2020Version: 4.0
Summary:

This article provides information on how to send quotation mark and vertical line in the Secure CRT script.

Symptoms:

At times, we need to filter some of the output from the command line interface of JunOS in a SecureCRT script. For example:

root@router# run show configuration | display set | match "lab" 
Solution:

You can use either a double quote " or Chr(34) to accomplish this. Chr(124) is the equivalent of vertical line |. Note that Chr(13) refers to  Enter CR/.

In the SecureCRT script:

#$language = "VBScript"
#$interface = "1.0"

crt.Screen.Synchronous = True

Sub Main
 crt.Screen.Send "run show configuration " & chr(124) & " display set " & chr(124) & " match " & chr(34) & "lab" & chr(34) & chr(13)


End Sub

*************************

Above script generates the output below:

root@router# run show configuration | display set | match "lab" 
set system login user labroot uid 2001
set system login user labroot class super-user
set system login user labroot authentication encrypted-password "$ABC123"

Modification History:
2019-10-22: Updated to fit all Junos. Removed from archive.
2019-09-07:  Archived article.

Related Links

Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search