nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

shellScript tht to extract the interface name if their HWaddr starts with 00:0C

This is a discussion on shellScript tht to extract the interface name if their HWaddr starts with 00:0C within the Shell scripting forums, part of the Development/Scripting category; The below is the ifconfig interface. I need script tht should extract the interface name like eth1,eth2 etc., only if ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 07-31-2008, 06:03 PM
Junior Member
User
 
Join Date: Jul 2008
My distro: Debian
Posts: 3
Rep Power: 0
pooppp is on a distinguished road
Default shellScript tht to extract the interface name if their HWaddr starts with 00:0C

The below is the ifconfig interface. I need script tht should extract the interface name like eth1,eth2 etc., only if the interface's HWaddr should start with 00:0C
clue is tht all HWaddr is starting with 00:0C


eth1 Link encap:Ethernet HWaddr 00:0C:FC:00:23:5D
inet addr:1.1.1.3 Bcast:1.255.255.255 Mask:255.0.0.0

eth2 Link encap:Ethernet HWaddr 00:0C:FC:00:23:5E
inet addr:2.1.1.3 Bcast:1.255.255.255 Mask:255.0.0.0

I need to extract the interface name like eth1,eth2 for the above case
Help for me
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Squirrelmail is not showing interface... sunguru Getting started tutorials 0 06-03-2008 10:56 PM
Script to extract some part of files: satish1482 Shell scripting 0 03-13-2007 06:30 PM
What is sit0 interface? ricc Linux software 2 08-07-2006 11:45 PM
how to extract zip files in linux Linux software 1 01-11-2006 12:30 AM
Script to extract a specific row of data ricc Shell scripting 1 11-15-2005 03:29 PM


All times are GMT +5.5. The time now is 01:32 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36