Usage of the output filter on Juniper CLI

You may have seen in the previous lessons that whenever we want to check if the configuration is done correctly then we use the “show” command.

In this lesson, I will explain how you can filter the output of the “show” command.

I am still connected via a console cable to the Juniper router. Let me show you how you can filter the “show” command:

root# show | ?

Possible completions:

append              Append output text to file

compare            Compare configuration changes with prior version

count                 Count occurrences

display              Show additional kinds of information

except               Show only text that does not match a pattern

find                   Search for first occurrence of pattern

hold                  Hold text without exiting the –More– prompt

last                 Display end of output only

match             Show only text that matches a pattern

no-more         Don’t paginate output

request           Make system-level requests

save                Save output text to file

tee                  Write to standard output and file

trim                 Trim specified number of columns from start of line

When I write “show” with a pipe and a question mark, it shows for me the output filters that I can use.

The 1st output filter that I want to speak about is the “count”. When you write just “show”, it will show you the configuration on the router via lines as the following:

root# show

## Last changed: 2024-02-03 17:39:40 UTC

version 14.1R4.8;

system {

root-authentication {

encrypted-password “$1$3hHX87WB$VlIPrcgAMz9TInBYol9.U/”; ## SECRET-DATA


syslog {

user * {

any emergency;


file messages {

any notice;

authorization info;


file interactive-commands {

interactive-commands any;







Apologies, the Full Lesson Access is Only for Members....


Get Access to all Lessons from different Vendors


Affordable Price to Enhance your IT Skills!


Always Accessing all Lessons including the New Added Ones

100% Satisfaction Guaranteed!

You can cancel your membership at anytime.
No Questions Asked Whatsover!

Course Content


Submit a Comment

Your email address will not be published. Required fields are marked *