View Single Post
  #1   (View Single Post)  
Old 2nd February 2011
isthistheend isthistheend is offline
New User
 
Join Date: Feb 2011
Posts: 4
Unhappy Combining outputs?

Hi,
i'm new at shell scripting.. i need to combine different syntax outputs.
I try to get interface name with first syntax and ip add with second one..

ifconfig |grep -E 'flags' |grep -v lo |grep -v enc |awk -F":" '{print $1}'

ifconfig |grep -E 'inet' |grep -v inet6 | grep -v 127.0.0.1 |awk '{print $2}'

i need to combine their outputs like;

"İnterface name" "ip address"

i bet solution is too easy but i stuck D:
Please Help.. Thanks a lot..
Reply With Quote