| (pipe) modifier
Syntax
<count | display xml | exceptpattern| findpattern| hold | lastlines| matchpattern| no-more | request message (all | useraccount@terminal) | resolve <full-names | truncate> | savefilename| trimcolumns>Description
Filter the output of an operational mode command.
Options
count—Display the number of lines in the output.
display xml—Display XML content of the command.
exceptpattern—Ignore text matching a regular expression when searching the output. If the regular expression contains spaces, operators, or wildcard characters, enclose it in quotation marks.
findpattern—Display the output starting at the first occurrence of text matching a regular expression. If the regular expression contains spaces, operators, or wildcard characters, enclose it in quotation marks.
hold—Hold text without exiting the--More--prompt.
lastlines—Display the text starting at the specified number of lines from the end of the output.
matchpattern—Search for text matching a regular expression. If the regular expression contains spaces, operators, or wildcard characters, enclose it in quotation marks.
no-more—Display output all at once rather than one screen at a time.request
message(all | user account@terminal)—Display command output on the terminal of a specific user logged onto your router, or on the terminals of all users logged onto your router.
resolve <full-names | truncate>—Convert IP addresses into DNS names. By default, names are truncated to fit original size. To prevent the names from being truncated, use thefull-namesoption.
savefilename—Save the output to a file.
trimcolumns—Trim specified number of columns from the start line.Usage Guidelines
See Table 4. For information on filtering configuration mode command output, see the JUNOS System Basics Configuration Guide.
Table 4 describes the commands that can be used with the pipe ( | ) option in operational mode; see also | (pipe) modifier.
Table 4: Filtering Operational Mode Command Output
Ignores text matching the regular expression. If the regular expression contains spaces, operators, or wildcard characters, enclose it in quotation marks (" " ).
Displays output starting at the first occurrence of text matching the regular expression. If the regular expression contains spaces, operators, or wildcard characters, enclose it in quotation marks (" " ).
Displays text starting at the specified number of lines from the end of the output.
Displaying the Lines You Want to View from the End of the Output
Searches for text matching the regular expression. If the regular expression contains spaces, operators, or wildcard characters, enclose it in quotation marks.
Displays output all at once rather than one screen at a time.
Display command output on the terminal of a specific user logged onto your router, or on the terminals of all users logged onto your router.
Converts IP addresses into domain name server (DNS) names. By default, names are truncated to fit the original size. To prevent names from being truncated, use the full-names keyword.
NOTE: There are additional filtering commands available with the pipe ( | ) option in configuration mode; for these options, see the JUNOS System Basics Configuration Guide.
For the output of a single command, you can redirect the output one or more times. For example:
user@host>command| matchregular-expression| exceptregular-expression| matchother-regular-expression| findregular-expression| hold