📜 ⬆️ ⬇️

Cisco CLI in BASH

After a long work with Linux and Cisco through the console, I start to get confused and write tsisk commands in BASH and vice versa. To my annoyance, they do not do what I want them to do. So I came up with a small hack for BASH, which allows you to emulate a couple of IOS CLI commands in bash. This is done like this:

echo 'alias show="cat"' >> ~/.bashrc echo 'alias i="grep --color"' >> ~/.bashrc 


After relogin, in bash you can do this:

')
 17:14:33, t1 ~ $ show samle_conf.cfg | i spanning-tree spanning-tree mode rapid-pvst spanning-tree etherchannel guard misconfig spanning-tree extend system-id spanning-tree pathcost method long spanning-tree portfast spanning-tree bpduguard enable ... 

Source: https://habr.com/ru/post/141750/


All Articles