tricky shell question?



Hello
Im writing a script tp get some settings for a network interface, i
want to make it support a vlan interface

such as:

e1000g430002

which i get from ifconfig -a

I want to run some commands on the above e.g. awk/sed to return:

e1000g2 (the last digit is the physical interface number)

The characteristics of a vlan interface is that after the 'last'
letter in the interface is followed by 4 or more digits(we times it by
1000), then add the instance number on the end(this is the number im
after)

e.g.

bge435003 - real interface= bge3 (vlan 435)
ce435003 - real interface = ce3 (vlan 435)

I also need to grep the instance number which is characterized by the
digits after the last letter of the interface.
e.g.

e1000g10 = instance number = 10

Any help appreciated
Thanks





.



Relevant Pages

  • Re: Vlan Interface drops
    ... I used the term QOS a bit loosely. ... Although this interface is routing a high volume (8Mb ... hard time understanding why the packets would be dropped. ... only at the vlan interface. ...
    (comp.dcom.sys.cisco)
  • [PATCH] allow VLAN interface on top of bridge interface
    ... When a VLAN interface is created on top of a bridge interface and netfilter is enabled to see the bridged packets, the packets can be corrupted when passing through the netfilter code. ...
    (Linux-Kernel)
  • Re: tricky shell question?
    ... Im writing a script tp get some settings for a network interface, ... The characteristics of a vlan interface is that after the 'last' letter ... digits after the last letter of the interface. ... Of course you can do all of this stuff in POSIX shells without using sed. ...
    (comp.unix.shell)
  • Re: Interfaces FE on Cisco 2821 problem
    ... need to plug a device into the Fast Ethernet port before the VLAN interface will come up. ... Check by using show interface command and making sure the VLAN interfce shows as up and up BEFORE trying to ping it. ...
    (comp.dcom.sys.cisco)
  • Re: Debian: VLAN und Bridge in einem
    ... Bridge zwischen einem VLAN Interface herstellen (und einem anderen ... Device das erst später dazukommt). ... Habe ich für openvpn-Tunnel mittels tap auch so gelöst. ...
    (de.comp.os.unix.networking.misc)