Results 1 to 1 of 1
Hi,
I have a simple problem.
I get the o/p of a command as this:
[root ~]# brctl show
bridge name bridge id STP enabled interfaces
brib0 8000.feffffffffff no vif8.2
...
- 10-15-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 1
how to group records to create a list
Hi,
I have a simple problem.
I get the o/p of a command as this:
[root ~]# brctl show
bridge name bridge id STP enabled interfaces
brib0 8000.feffffffffff no vif8.2
brib1 8000.feffffffffff no vif8.3
brvn15 8000.001397016030 no vif8.4
vif10.2
vn15
xenbr0 8000.0030488edbae no vif10.0
vif8.0
eth0
xenbr1 8000.0030488edbaf no vif10.1
vif8.1
eth1
[root ~]#
I would like to make a list of vifs under a particular bridge, say brvn15.
So, my list should look like this:
brvn15_list=vif8.4 vif10.2 vn15
How do I write a shell script to achieve this? Optionally awk can also be used.
Regards,
Kongkon


Reply With Quote