View Single Post
Old 07-06-2005, 02:21 PM  
SteveF
Confirmed User
 
Join Date: Jan 2005
Posts: 120
This example works in a bash environment, just surround your command line in such a fashion:

[sf@steve]$ export TEST=`ifconfig rl0|grep netmask|awk '{print $2}'`
-=[~]=- -=[Wed Jul 06]=- -=[17:18:06]=-
[sf@steve]$ echo $TEST
xxx.xxx.xxx.xxx (replaced for obvious reasons)

You'll have to narrow the search down more if you have virtual IPs bound to the same interface, etc.

S.
SteveF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote