Sponsored Content
Top Forums Shell Programming and Scripting awk question - getting ip from ifconfig Post 302379595 by Franklin52 on Friday 11th of December 2009 06:37:13 AM
Old 12-11-2009
Or:

Code:
ifconfig -a | awk -v var="e1000g0" '$0 ~ var{getline;print $2;exit}'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Further question on 'ifconfig' output

I asked a similar question earlier and got a very good answer but a new doubt came up. This is a few lines of a '/sbin/ifconfig' command on my PC: RX packets:3781025 errors:0 dropped:0 overruns:0 frame:0 TX packets:1941909 errors:0 dropped:0 overruns:0 carrier:0 Does the RX and TX packets... (1 Reply)
Discussion started by: mint1981
1 Replies

2. UNIX for Dummies Questions & Answers

Newbie ifconfig question

SunOS Release 5.7. Original ifconfig -a output: pnt0: flags=863<UP, BROADCAST,NOTRAILERS........ inet 10.2.34.49 netmask fffffe00 broadcast 10.2.34.255 ... Attempted to change ip address for pnt0. Typed the following command and forgot the "netmask" "ifconfig pnt0 10.2.35.49... (1 Reply)
Discussion started by: forbin24
1 Replies

3. HP-UX

HP-UX ifconfig question.

This will most likely be a real dumb question for a HP-UX admin, but here it goes anyhow. lan0 - is up and configured lan1 - is down, I want to bring it up. lanconfig....ifconfig is there a difference? My real question is, in solaris there is an /etc/hostname."?" file, is there a... (4 Replies)
Discussion started by: viRaven
4 Replies

4. UNIX for Dummies Questions & Answers

ifconfig

I am trying to change an IP address on a machine running HPUX10 After I change it I can ping it from the outside but it completely locks the console. After a reboot it returns back to its previous IP. Any ideas?? Thanks Brian (7 Replies)
Discussion started by: breigner
7 Replies

5. OS X (Apple)

ifconfig

Hi, I type (as root) "ifconfig en1 ether aa:aa: " but it doesnt change the mac of my airport. Can anyone help me? Thx. (0 Replies)
Discussion started by: Jariya
0 Replies

6. UNIX for Dummies Questions & Answers

ifconfig eth0 and awk and grep

if i have the command ifconfig eth0, what will the output be and how can i use either awk or grep to isolate and display the IP address, subnet mask and physical address of my host (1 Reply)
Discussion started by: carlvernon
1 Replies

7. Solaris

Solaris 10 question on ifconfig

On prior versions to solaris 10 when I want to add/change the IP address of an interface I will use this command. ifconfig eri0 down ifconfig eri0 192.xxx.xxx.xxx netmask 255.xxx.xxx.xxx up then change /etc/hosts so that /etc/hostname.eri0 picks up on the correct IP. I strange thing... (2 Replies)
Discussion started by: sparcguy
2 Replies

8. Shell Programming and Scripting

ifconfig!!!!

why the ifconfig command is not working in my machine? it says "-bash: ifconfig: command not found" why its says that? actually i m looking for "how can I know the Network Interface Card physical address?" Requesting u all for help. thanks (3 Replies)
Discussion started by: moco
3 Replies

9. UNIX for Dummies Questions & Answers

Basic awk question...getting awk to act on $1 of the command itself

I have a script problem that I am not able to solve due my very limited understanding of unix/awk. This is the contents of test.sh awk '{print $1}' From the prompt if I enter: ./test.sh Hello World I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Discussion started by: JasonHamm
2 Replies

10. Shell Programming and Scripting

awk question : system output to awk variable.

Hi Experts, I am trying to get system output to capture inside awk , but not working: Please advise if this is possible : I am trying something like this but not working, the output is coming wrong: echo "" | awk '{d=system ("date") ; print "Current date is:" , d }' Thanks, (5 Replies)
Discussion started by: rveri
5 Replies
DE(4)							   BSD Kernel Interfaces Manual 						     DE(4)

NAME
de -- DECchip 21040, 21140, 21141, 21142, and 21143 PCI Ethernet interface driver SYNOPSIS
de* at pci? dev ? function ? Configuration of PHYs may also be necessary. See mii(4). DESCRIPTION
The de driver supports Ethernet and Fast Ethernet interfaces based on the Digital Equipment Corporation DECchip 21040, 21140, 21141, 21142, and 21143 model controllers for PCI bus. 21040 10BASE-T and AUI/BNC 21140 10BASE-T and 100BASE-TX 21141 10BASE-T and 100BASE-TX 21142 10BASE-T and 100BASE-TX 21143 10BASE-T and 100BASE-TX Supported Network Interface Cards (NIC) include, but are not limited to: Accton EN1207i Cogent EM100 Asante AsanteFAST DEC DE435 DEC DE450 DEC DE500 SMC 9332 Znyx NetBlaster ZX340 series (345, 348, 346) Generally, if the NIC is for PCI bus, and the major controller chip has the DIGITAL logo on it, with one of the model numbers above, the de driver should recognize and control it. Beware, however, that many NIC manufacturers change the Ethernet controller chip without changing the product model number, and a physical inspection of the NIC, or a probe of the NIC with a PCI diagnostic tool is the only way to tell if a real DEC TULIP controller is present. Multi-port interfaces are typically configured as a PCI-PCI bridge with multiple de instances on the PCI bus on the other side of the bridge. DEC sold its semiconductor division to Intel. In addition, there are many "knock-offs" of the DEC TULIP Ethernet controller chips; NICs based on these chips are handled by the tlp(4) driver. This de driver should not be confused with the NetBSD VAX de driver for the DEC DEUNA/DELUA Ethernet controller for UniBus. SEE ALSO
ifmedia(4), intro(4), mii(4), pci(4), tlp(4), ifconfig(8) http://www.adaptec.com/, http://www.asante.com/, http://www.smc.com/, http://www.znyx.com/ HISTORY
The de driver first appeared in NetBSD 1.1 AUTHORS
Matt Thomas <matt@3am-software.com>. BSD
February 11, 2000 BSD
All times are GMT -4. The time now is 05:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy