The input file looks like this:
----+----1----+----2----+----3----+
NAME1111 ####### FILENAME.GOES.HE
RE_AND_CONTINUES
_DOWN_HERE_AND_K
EEPS_GOING.TXT
NAME2222 ####### NEXT_FILE.TXT
NAME2222 ####### ANOTHER_FILE_YET
_AGAIN.TXT
NAME3333 ####### THIRD_FILE_NAME_
TWO_LINES.TXT
NAME1111 ####### FILENAME.GOES.HE
RE_AND_CONTINUES
_DOWN_HERE_AND_K
EEPS_GOING.TXT
NAME2222 ####### NEXT_FILE.TXT
NAME2222 ####### ANOTHER_FILE_YET
_AGAIN.TXT
NAME3333 ####### THIRD_FILE_NAME_
TWO_LINES.TXT
And I need the output file to look like this.
NAME1111 FILENAME.GOES.HERE_AND_CONTINUES_DOWN_HERE_AND_KEEPS_GOING.TXT
NAME2222 NEXT_FILE.TXT
NAME2222 ANOTHER_FILE_YET_AGAIN.TXT
NAME3333 THIRD_FILE_NAME_TWO_LINES.TXT
NAME2222 NEXT_FILE.TXT
NAME2222 ANOTHER_FILE_YET_AGAIN.TXT
NAME3333 THIRD_FILE_NAME_TWO_LINES.TXT
The filename field in this file can continue on several lines and this where I have the issues. The first 8 character name column can repeat many times and is not unique and neither are the files names so there is no unique key. I was hoping to do what I need with a quick and dirty sort rather than having to write a program.
Thanks in advance for any replies.