Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: data dump and sort

by 5mi11er (Deacon)
on Aug 07, 2013 at 01:57 UTC ( [id://1048228]=note: print w/replies, xml ) Need Help??


in reply to data dump and sort

Worse, the code, once one puts line feeds in the appropriate spots, becomes apparent that it doesn't really DO anything.

It does manage to get the output of two cisco commands (show log, and show interface description), then simply throws that info to the screen.

If you're looking to see what interfaces are up/down, perhaps a "show ip int brief" (or similar command depending on the device and IOS version) might be more helpful?

But it looks like you might be attempting to grasp at asking how to filter through the log file, looking for up/down messages. I would suggest reading up on regular expressions and the grep command, or you could do it line by line like this:

while(@show_log_output) { if (/(up|down)/i) { print $_; } }
-Scott

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1048228]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found