Difference between revisions of "Cisco CLI Output Modifiers"

From Ever changing code
Jump to navigation Jump to search
 
Line 2: Line 2:
  show int status | i 1/0/13|1/0/14|1/0/15|1/0/16
  show int status | i 1/0/13|1/0/14|1/0/15|1/0/16
  sh dtp int | i DTP|TRUNK
  sh dtp int | i DTP|TRUNK
= Output modifiers and Regular Expressions =
;Special Characters:
:. = Matches any single character
:\ = Matches the character following the backslash. Used to match the face value of special characters.
:_ = Matches white space space and select characters such as comma (,), left brace ({), right brace (}), the beginning of the input string, the end of the input string, or a space.
;Groups, Nests and Ranges
:[ ] = Matches any character within the left and right square brackets.
:() = Nest characters for matching or to apply a multiplier too, or for recall
:- = Used to create a range of characters that can match within square brackets
;Anchors
:^ = Matches the character or null string at the beginning of an input string.
:$ = Matches the character or null string at the end of an input string.
;Multipliers
:? = Matches zero or one occurrence of the pattern.
:<nowiki>*</nowiki> = Matches zero or more sequences of the character preceding the asterisk.
:+ = Matches one or more sequences of the character preceding the plus sign.
;Alternation
:| = Logical OR. Matches one of the characters or character patterns on either side of the vertical bar.


= References =
= References =
*[http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/configuration/15_sy/fundamentals-15-sy-book/cf-cli-search.html Searching and Filtering CLI Output]
*[http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/configuration/15_sy/fundamentals-15-sy-book/cf-cli-search.html Searching and Filtering CLI Output]

Latest revision as of 13:48, 10 May 2014

Include multiple patterns

show int status | i 1/0/13|1/0/14|1/0/15|1/0/16
sh dtp int | i DTP|TRUNK

Output modifiers and Regular Expressions

Special Characters
. = Matches any single character
\ = Matches the character following the backslash. Used to match the face value of special characters.
_ = Matches white space space and select characters such as comma (,), left brace ({), right brace (}), the beginning of the input string, the end of the input string, or a space.
Groups, Nests and Ranges
[ ] = Matches any character within the left and right square brackets.
() = Nest characters for matching or to apply a multiplier too, or for recall
- = Used to create a range of characters that can match within square brackets
Anchors
^ = Matches the character or null string at the beginning of an input string.
$ = Matches the character or null string at the end of an input string.
Multipliers
? = Matches zero or one occurrence of the pattern.
* = Matches zero or more sequences of the character preceding the asterisk.
+ = Matches one or more sequences of the character preceding the plus sign.
Alternation
| = Logical OR. Matches one of the characters or character patterns on either side of the vertical bar.

References