05-26-2009
139,
0
Join Date: Apr 2008
Last Activity: 16 August 2013, 4:18 PM EDT
Location: Michigan,USA
Posts: 139
Thanks Given: 0
Thanked 0 Times in 0 Posts
Cut on a list ..how do i cut this?
Guys
I am trying to get all physical plus logical interfaces on a host to pass them to a 'for' loop.
'ifconfig -a' gives me all interfaces like following...i need to cut last ':' from this list.What 'cut' syntax i need to use?
bash-2.05$
ifconfig -a|awk '{print $1}'|sort|uniq|egrep -v "^group|inet|lo0|ether"|awk '{print $1}'
ba0:
ce0:
ce0:1:
ce0:2:
ce1:
qfe0: