In the awk piped to sed below I am trying to format file by removing the odd xxxx_digits and whitespace after, then move the even xxxx_digit to the line above it and add a space between them. There may be multiple lines in file but they are in the same format. The Filename_ID line is the last line in the block and is unique to each. There will always be a newline seperating the blocks and that line FileName_ID is not processed only printed. It is possible that there is nothing above the FileName_ID and if this happens then it is also printed as is. The code executes but the output is unchanged and is probably not the best way. Thank you :).
EDIT: Above solution will take care of only 1 EVEN id adding per line, lets say you may have multiple even ids which need to be added and printed in that case try following.