awk with sed to combine lines and remove a uniform pattern from the line

in the awk channeled to sed below, I try to format a file by deleting the xxxx_digits and the spaces after, then move the same xxxx_digit above the line and add a space between them. There may be several lines in file but they are in the same format. the Nom_fichier_ID line is the last line of the block and is unique for everyone. There will always be a new line separating the blocks and this line FileName_ID is not treated that printed. It is possible that there is a higher score than FileName_ID and if that happens, it is also printed as is.

file

00-0000-Lname-Fname-REPEAT
xxxx_0001 xxxx_0002
111111-yyyy
xxxx_0003 xxxx_0008
111111-yyyy-0
xxxx_0009 xxxx_0006
FileName_ID

FileName_ID

desired

xxxx_0002 00-0000-Lname-Fname-REPEAT
xxxx_0008 111111-yyyy
xxxx_0006 111111-yyyy-0
FileName_ID

FileName_ID

awk

awk # NR% 2 {printf "% s", $ 0; next;} 1 & # 39; file | sed & # 39; s / xxxx_[0-9][0-9][0-9][02468]// g & # 39;