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
XtGetClassExtension(3X) 					   XT FUNCTIONS 					   XtGetClassExtension(3X)

NAME
XtGetClassExtension - locate a class extension record SYNTAX
XtPointer XtGetClassExtension(object_class, byte_offset type, version, record_size) WidgetClass object_class; Cardinal byte_offset; XrmQuark type; long version; Cardinal record_size; ARGUMENTS
object_class Specifies the widget class containing the extension list to be searched. byte_offset Specifies the offset in bytes form the base of the widget class of the extension field to be searched. type Specifies the name of the class extension to be located. version Specifies the minimum acceptable version of the class extension required for a match. record_size Specifies the minimum acceptable length of the class extension record required for match, or 0. DESCRIPTION
The list of extension records at the specified offset in the specified widget_class will be searched for a match on the specified type, a version greater than or equal to the specified version, and a record size greater than or equal the specified record_size if it is nonzero. XtGetClassExtension returns a pointer to a matching extension record or NULL if no match is found. The returned extension record is owned by the widget class and must not be modified or freed by the caller, except possibly to be modified by the widget class owner. X Version 11 Release 6 XtGetClassExtension(3X)
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy