The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 12:31 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 12:06 AM
here document to automate perl script that call script hogger84 Shell Programming and Scripting 3 10-22-2007 07:15 AM
returning to the parent shell after invoking a script within a script gurukottur Shell Programming and Scripting 5 09-26-2006 04:05 AM
return valuse from child script to parent script borncrazy Shell Programming and Scripting 1 08-20-2004 12:39 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-24-2008
Registered User
 

Join Date: Jan 2008
Location: Madrid Spain
Posts: 7
help ip script

hi everyone i dont have much experiencie in shell programing i need take/see/print the next stuff from at leas 45 solaris 8 machines

interface name (qfe, hme , etc)
ip address (x.x.x.x)
ether or mac (8:0:20:e8:da:45)

i do the next

# ifconfig -a | awk '{print $1, $2 ;}'|grep -v "lo0"|grep -v "127.0.0"

and work very weel but i net take out some data for example

this is the ouput whit my (script, command)

qfe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
inet 10.64.115.34
ether 8:0:20:e8:da:45
qfe2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
inet 172.16.1.101
ether 8:0:20:e8:da:45

i net take out all the flags=1000843,UP,BROADCAST,RUNNING..........

thanks a lot

pd: sorry about my english
Reply With Quote
Forum Sponsor
  #2  
Old 01-24-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 734
Code:
ifconfig -a | awk '/inet/ { print $1,$2 } /flags=/ { print $1 }' |grep -v "lo0"|grep -v "127.0.0"
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0