This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

cfgrep

cfgrep(c4grep, ccccgrep) is Cisco-like Config Context-aware Check grep

Downloads
Downloads
Downloads
published

Installing

pip from PyPI

pip install cfgrep

, or pip from github

pip install wheel git+https://github.com/tk-hayashi/cfgrep

, or running setup.py

git clone https://github.com/tk-hayashi/cfgrep
cd cfgrep
python setup.py install

Usage

Regular expressions can be used as PATTERN similar to grep.

 > cfgrep -h
Overview:
    cfgrep(c4grep, ccccgrep) is Cisco Config Context-aware Check grep

Usage:
    cfgrep <PATTERN> <FILE> [-i | --interface] [-b | --bgp] [-d | --description]
    cfgrep -h | --help

Options:
    -i, --interface    interface mode
    -b, --bgp          bgp mode
    -d, --description  to specify PATTERN by description
    -h, --help         display help

options

See examples-xr.md and examples-ios.md for details of options

option description
-i Interface mode. To display a config related to ipv4 and ipv6 address of the interfaces.
-b BGP mode. To display a config related to route-policy(route-map) and bgp-group of the neighbors.
-d Description mode. To use a parent indent of description as PATTERN.

Authors

  • Toshiki Hayashi - Initial work

License

This project is licensed under the Apache License - see the LICENSE file for details

Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.