Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to parse the specific data from the file Post 302264106 by MuthuAlagappan on Wednesday 3rd of December 2008 06:41:33 AM
Old 12-03-2008
here i am having other interface also like valn30, Null0,Ehternet10... so i need a soultion for the all the interface it takes only the number not the name.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help!!! Shell script to parse data file.

I am faced with a :confused: tricky problem to parse a data file ( May not be a tricky problem to the scripting guru's ). Here is what I am faced with. I have a file with multiple rows of data and the rows are not of fixed length. "|" is used as a delimiters for individual columns and each row... (3 Replies)
Discussion started by: yajaykumar
3 Replies

2. Shell Programming and Scripting

Parse config file data to script variable

I have a script with few pre defined variables. Also have a config file. Something like this. # config file # Define Oracle User MOD1_TAG=abcde MOD2_TAG=xyzabc MOD3_TAG=def I need to parse the config file and have each of the value copied to different variables. Please suggest what... (1 Reply)
Discussion started by: souryadipta
1 Replies

3. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

4. Shell Programming and Scripting

Parse hdiutil -plist data for specific info

I am trying to get the mounted size of a compressed .dmg. I can use hdiutil imageinfo -plist $imagename to get a lot of info, including what I need. The problem is that I have no idea how to parse that single piece of info into a variable (or in this case, array element). Here is what I have so... (2 Replies)
Discussion started by: nextyoyoma
2 Replies

5. Shell Programming and Scripting

RegeX to parse data from a txt file

Hi all the experts out there, I am totally new to perl and I was given an assignment by using Perl to find the 2nd element of each line in each curly bracket which made up of 5 elements. Expected result should like this: Type: VCC Pin_name: AK32,AL32,AH21,..... Type: NC Pin_name:... (2 Replies)
Discussion started by: killbanne
2 Replies

6. Shell Programming and Scripting

AWK script to parse a data in a file

Hi Unix gurus.. I have a file which has below data, It has several MQ Queue statistics; QueueName= 'TEST1' CreateDate= '2009-10-30' CreateTime= '13.45.40' QueueType= Predefined QueueDefinitionType= Local QMinDepth= 0 QMaxDepth= 0 QueueName= 'TEST2' CreateDate= '2009-10-30'... (6 Replies)
Discussion started by: dd_psg
6 Replies

7. Shell Programming and Scripting

Read multiple files, parse data and append to a file

Hi..Can anyone suggest a simple way of achieving this. I have several files which ends with extension .vcf . I will give example with two files In the below files, we are interested in File 1: 38 107 C 3 T 6 C/T 38 241 C 4 T 5 C/T 38 247 T 4 C 5 T/C 38 259 T 3 C 6 T/C... (8 Replies)
Discussion started by: empyrean
8 Replies

8. Shell Programming and Scripting

Parse text file using specific tags

awk -F "" '/<href=>|<href=>|<top>|<top>/ {print $3, OFS=\t}' source.txt > output.txt I'm not quite sure how to parse the attached file, but what I am trying to do is in a output file have the link (href=), name (after the <), and count (<top>) in 3 separate columns. My attempt is the above... (2 Replies)
Discussion started by: cmccabe
2 Replies

9. Shell Programming and Scripting

awk parse result that match data from file

i run command that return this result,example : gigabitethernet2/2/4:NotPresent, gigabitethernet2/1/17:UP, gigabitethernet2/1/10:UP, gigabitethernet2/1/5:UP, gigabitethernet2/1/9:UP, gigabitethernet2/1/36:DOWN, gigabitethernet2/1/33:DOWN, gigabitethernet2/1/8:UP,... (19 Replies)
Discussion started by: wanttolearn1
19 Replies

10. Shell Programming and Scripting

Parse file for fields and specific text

I have a file of ~500,000 entries in the following: file.txt chr1 11868 12227 ENSG00000223972.5 . + HAVANA exon . gene_id "ENSG00000223972.5"; transcript_id "ENST00000456328.2"; gene_type "transcribed_unprocessed_pseudogene"; gene_status "KNOWN"; gene_name "DDX11L1"; transcript_type... (17 Replies)
Discussion started by: cmccabe
17 Replies
Info::CiscoVTP(3pm)					User Contributed Perl Documentation				       Info::CiscoVTP(3pm)

NAME
SNMP::Info::CiscoVTP - SNMP Interface to Cisco's VLAN Management MIBs AUTHOR
Max Baker SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. my $vtp = new SNMP::Info( AutoSpecify => 1, Debug => 1, DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost. "; my $class = $vtp->class(); print "SNMP::Info determined this device to fall under subclass : $class "; DESCRIPTION
SNMP::Info::CiscoVTP is a subclass of SNMP::Info that provides information about a Cisco device's VLAN and VTP Domain membership. Use or create in a subclass of SNMP::Info. Do not use directly. Inherited Classes None. Required MIBs CISCO-VTP-MIB CISCO-VLAN-MEMBERSHIP-MIB CISCO-VLAN-IFTABLE-RELATIONSHIP-MIB MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz GLOBALS
$vtp->vtp_version() ("vtpVersion") $vtp->vtp_maxstore() ("vtpMaxVlanStorage") $vtp->vtp_notify() ("vtpNotificationsEnabled") $vtp->vtp_notify_create() ("vtpVlanCreatedNotifEnabled") $vtp->vtp_notify_delete() ("vtpVlanDeletedNotifEnabled") $vtp->vtp_trunk_set_serial() ("vlanTrunkPortSetSerialNo") TABLE METHODS
Your device will only implement a subset of these methods. $vtp->i_vlan() Returns a mapping between "ifIndex" and assigned VLAN ID for access ports and the default VLAN ID for trunk ports. $vtp->i_vlan_membership() Returns reference to hash of arrays: key = "ifIndex", value = array of VLAN IDs. These are the VLANs which are members of enabled VLAN list for the port. Example: my $interfaces = $vtp->interfaces(); my $vlans = $vtp->i_vlan_membership(); foreach my $iid (sort keys %$interfaces) { my $port = $interfaces->{$iid}; my $vlan = join(',', sort(@{$vlans->{$iid}})); print "Port: $port VLAN: $vlan "; } VLAN Table ("CISCO-VTP-MIB::vtpVlanTable") See ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html <ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html> for a good treaty of how to connect to the VLANs $vtp->v_index() ("vtpVlanIndex") $vtp->v_state() ("vtpVlanState") $vtp->v_type() ("vtpVlanType") $vtp->v_name() ("vtpVlanName") $vtp->v_mtu() ("vtpVlanMtu") $vtp->v_said() ("vtpVlanDot10Said") $vtp->v_ring() ("vtpVlanRingNumber") $vtp->v_bridge() ("vtpVlanBridgeNumber") $vtp->v_stp() ("vtpVlanStpType") $vtp->v_parent() ("vtpVlanParentVlan") $vtp->v_trans1() ("vtpVlanTranslationalVlan1") $vtp->v_trans2() ("vtpVlanTranslationalVlan2") $vtp->v_btype() ("vtpVlanBridgeType") $vtp->v_hop_are() ("vtpVlanAreHopCount") $vtp->v_hop_ste() ("vtpVlanSteHopCount") $vtp->v_crf() ("vtpVlanIsCRFBackup") $vtp->v_type_ext() ("vtpVlanTypeExt") $vtp->v_if() ("vtpVlanIfIndex") VLAN Membership Table ("CISCO-VLAN-MEMBERSHIP-MIB::vmMembershipTable") $vtp->i_vlan_type() Static, Dynamic, or multiVlan. ("vmVlanType") $vtp->i_vlan2() The VLAN that an access port is assigned to. ("vmVlan") $vtp->i_vlan_stat() Inactive, active, shutdown. ("vmPortStatus") $vtp->i_vlan_1() Each bit represents a VLAN. This is 0 through 1023 ("vmVlans") $vtp->i_vlan_2() Each bit represents a VLAN. This is 1024 through 2047 ("vmVlans2k") $vtp->i_vlan_3() Each bit represents a VLAN. This is 2048 through 3071 ("vmVlans3k") $vtp->i_vlan_4() Each bit represents a VLAN. This is 3072 through 4095 ("vmVlans4k") VLAN Membership Voice VLAN Table ("CISCO-VLAN-MEMBERSHIP-MIB::vmVoiceVlanTable") $vtp->i_voice_vlan() ("vmVoiceVlanId") Management Domain Table ("CISCO-VTP-MIB::managementDomainTable") $vtp->vtp_d_index() ("managementDomainIndex") $vtp->vtp_d_name() ("managementDomainName") $vtp->vtp_d_mode() ("managementDomainLocalMode") $vtp->vtp_d_rev() ("managementDomainConfigRevNumber") $vtp->vtp_d_updater() ("managementDomainLastUpdater") $vtp->vtp_d_last() ("managementDomainLastChange") $vtp->vtp_d_status() ("managementDomainRowStatus") $vtp->vtp_d_tftp() ("managementDomainTftpServer") $vtp->vtp_d_tftp_path() ("managementDomainTftpPathname") $vtp->vtp_d_pruning() ("managementDomainPruningState") $vtp->vtp_d_ver() ("managementDomainVersionInUse") VLAN Trunk Port Table ("CISCO-VTP-MIB::vlanTrunkPortTable") $vtp->vtp_trunk_mgmt_dom() ("vlanTrunkPortManagementDomain") $vtp->vtp_trunk_encaps_t() ("vlanTrunkPortEncapsulationType") $vtp->vtp_trunk_vlans() ("vlanTrunkPortVlansEnabled") $vtp->vtp_trunk_vlans_2k() ("vlanTrunkPortVlansEnabled2k") $vtp->vtp_trunk_vlans_3k() ("vlanTrunkPortVlansEnabled3k") $vtp->vtp_trunk_vlans_4k() ("vlanTrunkPortVlansEnabled4k") $vtp->vtp_trunk_native() ("vlanTrunkPortNativeVlan") $vtp->i_pvid() ("vlanTrunkPortNativeVlan") $vtp->vtp_trunk_rstat() ("vlanTrunkPortRowStatus") $vtp->vtp_trunk_dyn() ("vlanTrunkPortDynamicState") $vtp->vtp_trunk_dyn_stat() ("vlanTrunkPortDynamicStatus") $vtp->vtp_trunk_vtp() ("vlanTrunkPortVtpEnabled") $vtp->vtp_trunk_encaps() ("vlanTrunkPortEncapsulationOperType") SET METHODS
These are methods that provide SNMP set functionality for overridden methods or provide a simpler interface to complex set operations. See "SETTING DATA VIA SNMP" in SNMP::Info for general information on set operations. $vtp->set_i_vlan ( vlan, ifIndex ) Changes an access (untagged) port VLAN, must be supplied with the numeric VLAN ID and port "ifIndex". This method should only be used on end station (non-trunk) ports. Example: my %if_map = reverse %{$vtp->interfaces()}; $vtp->set_i_vlan('2', $if_map{'FastEthernet0/1'}) or die "Couldn't change port VLAN. ",$vtp->error(1); $vtp->set_i_pvid ( pvid, ifIndex ) Sets port default VLAN, must be supplied with the numeric VLAN ID and port "ifIndex". This method should only be used on trunk ports. Example: my %if_map = reverse %{$vtp->interfaces()}; $vtp->set_i_pvid('2', $if_map{'FastEthernet0/1'}) or die "Couldn't change port default VLAN. ",$vtp->error(1); $vtp->set_add_i_vlan_tagged ( vlan, ifIndex ) Adds the VLAN to the enabled VLANs list of the port, must be supplied with the numeric VLAN ID and port "ifIndex". Example: my %if_map = reverse %{$vtp->interfaces()}; $vtp->set_add_i_vlan_tagged('2', $if_map{'FastEthernet0/1'}) or die "Couldn't add port to egress list. ",$vtp->error(1); $vtp->set_remove_i_vlan_tagged ( vlan, ifIndex ) Removes the VLAN from the enabled VLANs list of the port, must be supplied with the numeric VLAN ID and port "ifIndex". Example: my %if_map = reverse %{$vtp->interfaces()}; $vtp->set_remove_i_vlan_tagged('2', $if_map{'FastEthernet0/1'}) or die "Couldn't add port to egress list. ",$vtp->error(1); perl v5.12.4 2011-09-28 Info::CiscoVTP(3pm)
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy