As you may have already realised I am always looking for ways to speed up my day to day tasks.
Every few days I check my BGP peering to see if there are any sessions down and then give the peers the obligatory nudge to reset a session.
Normally I run ‘ show bgp sum | i Active’ or Idle/Open which gives me a list of peers that are not in an ‘established’ state. This means running a seperate command for each Active/Idle/Open session.
Thats far too much like hard work so i started to see what other option were available after the | . One of them is utility egrep! So, after 7 mins of trying to run commands and finally realising I have to escape the | i have came up with the below:-
show bgp summary | utility egrep ‘Idle| Active| Open’
Hope it helps you save some time!