Sponsored Content
Top Forums Shell Programming and Scripting Grabbing IP and zonename from multiline 'ifconfig' output Post 302723743 by Yoda on Tuesday 30th of October 2012 04:25:00 PM
Old 10-30-2012
Try piping the output to the below code:-

Code:
awk 'BEGIN { print "iface ip zonename"; } /^nxge/,/[.*]$/ {
        if(match($1,/nxge/)>0)
                printf("\n%s",$1);
        if(match($1,/inet/)>0)
                printf(" %s",$2);
        if(match($1,/zone/)>0)
                printf(" %s",$2);
} '

This User Gave Thanks to Yoda For This Post:
 

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. Solaris

/sbin/zonename file giving me problems

I'm trying to install the recommended patch cluster on a x86 Solaris 10 box. I get this error: ERROR: /sbin/zonename cannot be found. install_cluster for 10_x86 patch cluster not applied. Exiting. I tried touching the file and it gave a different error of: expected argument.. anyone... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

3. UNIX for Dummies Questions & Answers

Grabbing a value from an output file

I am executing a stored proc and sending the results in a log file. I then want to grab one result from the output parameters (bolded below, 2) so that I can store it in a variable which will then be called in another script. There are more details that get printed in the beginning of the log file,... (3 Replies)
Discussion started by: hern14
3 Replies

4. Solaris

How to know the global zonename from non-global zone?

It is easy to list all zones from global zones, but how to find out the global zone name from non-global zone? thx (11 Replies)
Discussion started by: honglus
11 Replies

5. OS X (Apple)

Ifconfig output - help understanding flags 'Smart, Simplex', etc

Hi - Trying to understand a few things from an ifconfig -a output - can't seem to find info anywhere on the net. Specifically - looking to understand the following: Flags=8863 Smart Running (is this the same as UP) Simplex inet6 supported media: autoselect - does that imply the... (1 Reply)
Discussion started by: littlefrog
1 Replies

6. Shell Programming and Scripting

assigning a multiline grep output which has been piped through sed to a shell variabl

Hi, I wish to format the output of a grep command in such a way that sed will be able to handle the newline characters held in the output. Since sed does not allow newlines to be contained in a replacement pattern, that means adding a backslash '\' character to the end of each line from... (8 Replies)
Discussion started by: timculhane
8 Replies

7. Shell Programming and Scripting

Grabbing value from command output and monitoring for changes

Hi all, Very new to shell scripting so appreciate some help! There is a process count that I need to monitor, I have the AIX command that gives this value and I've cleaned it up with grep/awk so it only spits out the value I'm interested in: echo "psc -i 10050 -s RELOAD_SERVICE" | tmadmin... (14 Replies)
Discussion started by: monty77
14 Replies

8. Shell Programming and Scripting

parsing ifconfig output

I'm trying to gather information on the interfaces on a large number of servers. If I run ifconfig I will get: eth0 Link encap:Ethernet HWaddr 00:50:56:A2:27:C1 inet addr:10.145.xxx.xxx Bcast:10.152.45.255 Mask:255.255.254.0 ----- eth1 Link... (2 Replies)
Discussion started by: C0ppert0p
2 Replies

9. UNIX for Dummies Questions & Answers

Assigning ipv6 to bonding interface - getting old as well as changed ipv6 in ifconfig output

Hi, I have created a bonding bond1 interface with 6 Eth , mode=4. Recently i have changed my old ipv6 to new one and tried to restart as well as reload network service. Post which i can see old as well as changed ipv6 in ifconfig command output. Below are few files and command output for your... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies

10. Shell Programming and Scripting

Printing from multiline output

Dear all, I have below "ldapsearch" output $ ldapsearch -D "CN=SVC-ACCOUNT,OU=SVC,OU=VDSI,OU=Non-Human,DC=Org,DC=com" -w secretword -H ldaps://org.com:636 -b DC=Org,DC=com -s sub uid=v00000 "(filter)" "displayName" "uid" "street" # extended LDIF # # LDAPv3 # base <DC=Org,DC=com> with... (7 Replies)
Discussion started by: baluchen
7 Replies
NXGE(4) 						   BSD Kernel Interfaces Manual 						   NXGE(4)

NAME
nxge -- Neterion Xframe 10GbE Server/Storage adapter driver SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file: device nxge Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_nxge_load="YES" DESCRIPTION
The nxge driver provides support for Neterion Xframe-I and Xframe-II adapters. The driver supports TCP Segmentation Offload (TSO/LSO), Large Receive Offload (LRO), Jumbo Frames (5 buffer mode), Header Separation (Rx 2 buffer mode), VLAN, and Promiscuous mode. For general information and support, please visit the Neterion support page http://www.neterion.com/support/support.html. Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the ifconfig(8) utility configures the adapter to transmit and receive Jumbo Frames. Xframe adapters support Jumbo Frames up to 9600 bytes. For Jumbo Frames, the driver will try to allocate physically contiguous buffers. Failures to do so may degrade the performance. To resolve such problems, please visit http://www.neterion.com where additional information and a kernel patch can be found. For more information on configuring this device, see ifconfig(8). HARDWARE
The nxge driver supports Neterion Xframe 10 Gigabit Ethernet adapters listed in http://www.neterion.com/how/pricing.html. SUPPORT
For troubleshooting tips and FAQs, please visit http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous. For any issues please send an email to <support@neterion.com>. SEE ALSO
arp(4), netintro(4), ifconfig(8) HISTORY
The nxge device driver first appeared in FreeBSD 7.0. AUTHORS
The nxge driver was written by Neterion <support@neterion.com>. BSD
October 16, 2007 BSD
All times are GMT -4. The time now is 10:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy