Combine 2 lines

All,

i am new to linux script...

source

Filter: vlan281-BUM-5M
BUM-5M                                                  0                    0
Filter: vlan282-BUM-5M
BUM-5M                                                  0                    0
Filter: vlan2828-BUM-5M
Filter: vlan283-BUM-5M
BUM-5M                                                  0                    0

if using bash script like awk or sed
can change the result to...?

Filter: vlan281-BUM-5M BUM-5M          0                    0
Filter: vlan282-BUM-5M BUM-5M          0                    0
Filter: vlan283-BUM-5M BUM-5M          0                    0

while 2828 does not have BUM-5M, so can be ignore ??

thanks all

Hi

awk '/^BUM/{print x,$0;}{x=$0}' file

Guru.

Guru , thanks a lot.

i write a easy expect script , and grep the telnet output.txt , and > to the file.

 BUM-5M                                           10607963                 7717
 BUM-5M                                                  0                    0
 BUM-5M                                                  0                    0

Beforehand the source output.txt was done manually and paste the context on the txt file (through putty ssh), the result works perfect with

awk '/^BUM/{print x,$0;}{x=$0}'

will there be any different between the end of line ?

thanks a lot.