Sponsored Content
Full Discussion: Script to sort Cisco configs
Special Forums UNIX and Linux Applications Infrastructure Monitoring Script to sort Cisco configs Post 302466864 by azrael75 on Wednesday 27th of October 2010 02:30:32 PM
Old 10-27-2010
It works fine for the example, thanks a lot, but have an additional issue.

If the configuration has the following statements:

### INPUT ###
Code:
!
class-map match-all critical
 match ip dscp af31 
class-map match-all video
 match ip dscp ef 
!

### OUTPUT must be ###
Code:
class-map match-all critical match ip dscp af31 
class-map match-all video match ip dscp ef 

### The idea is each parameter is linked with its own parameters ###

I thought something like that "^interface"... "^class-map .. etc.

can you help me with that???...

Last edited by Scott; 10-27-2010 at 03:42 PM..
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help on ssh login script to cisco ios

I'm trying to write a login script to ssh into a cisco switch that will run some command remotely. Similar to this expect script located here: SSH login expect shell script to supply username and password However, that script does not work with cisco ios. Anyway know what the best way to... (1 Reply)
Discussion started by: streetfighter2
1 Replies

2. UNIX for Dummies Questions & Answers

VI - in need of configs/scripts

Hi, I'm somewhat new to unix OS and I'm at course for programmers in my country. and in the course we learn unix and how to script in unix. of course we just started and we learned only the very basic, but I'm a really computer freak and I looking for a way to make the course easier on all of... (8 Replies)
Discussion started by: Bonzay0
8 Replies

3. Shell Programming and Scripting

loop through configs

hi All, is there a way in linux to loop thru all variables sourced? i have a set configs like A=100 b=200 c=400 i can add the above lines to a file and source - so that $A will be 100 .. like wise now when i do a cut -c 1-2 file.txt |sort | uniq -c on a file it returns me A 100 B 50 c... (1 Reply)
Discussion started by: arun1401
1 Replies

4. UNIX for Advanced & Expert Users

Script to sort the files and append the extension .sort to the sorted version of the file

Hello all - I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies

5. Shell Programming and Scripting

Expect script to show cisco configs

I know there are better ways to do this. I prefer snmp. I do not have the proper perl modules loaded on the platorm. Snmp isnt loaded on the platform. Telnet is not an option. I need to write an expect script to pull cisco equipment configs. The following code is executed once I gain... (0 Replies)
Discussion started by: popeye
0 Replies

6. IP Networking

How to stack Cisco 2960-S and Cisco 2960X?

Is there an easy way to stack Cisco 2960-S and Cisco 2960X switches? If you have no idea, follow this: 1. Stacking is not supported on switches running the LAN Lite image. All switches in the stack must be running the LAN Base image. 2. In a mixed stack of Catalyst 2960-X and Catalyst 2960-S... (0 Replies)
Discussion started by: Ayaerlee
0 Replies
Info::Layer3::CiscoFWSM(3pm)				User Contributed Perl Documentation			      Info::Layer3::CiscoFWSM(3pm)

NAME
SNMP::Info::Layer3::CiscoFWSM - SNMP Interface to Firewall Services Modules for features not covered elsewhere. AUTHOR
Brian De Wolf SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. my $fwsm = new SNMP::Info( AutoSpecify => 1, Debug => 1, # These arguments are passed directly to SNMP::Session DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost. "; my $class = $fwsm->class(); print "SNMP::Info determined this device to fall under subclass : $class "; DESCRIPTION
Subclass for Cisco Firewall Services Modules Inherited Classes SNMP::Info::Layer3::Cisco Required MIBs Inherited Classes' MIBs See "Required MIBs" in SNMP::Info::Layer3::Cisco for its own MIB requirements. GLOBALS
Global Methods imported from SNMP::Info::Layer3::Cisco See documentation in "GLOBALS" in SNMP::Info::Layer3::Cisco for details. TABLE METHODS
These are methods that return tables of information in the form of a reference to a hash. Overrides $fwsm->at_paddr() This function derives the at_paddr information from the n2p_paddr() table as the MIB to provide that information isn't supported on FWSMs. $fwsm->at_netaddr() This function derives the at_netaddr information from the n2p_paddr() table as the MIB to provide that information isn't supported on FWSMs. $fwsm->at_ifaddr() This function derives the at_ifaddr information from the n2p_paddr() table as the MIB to provide that information isn't supported on FWSMs. Table Methods imported from SNMP::Info::Layer3::Cisco See documentation in "TABLE METHODS" in SNMP::Info::Layer3::Cisco for details. perl v5.12.4 2011-09-28 Info::Layer3::CiscoFWSM(3pm)
All times are GMT -4. The time now is 11:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy