Massaging text files

lvirden

New Member
Joined
Oct 6, 2017
Messages
7
Reaction score
0
Credits
0
I have a file with this format:
Code:
Title 1
- Character Name
- Character Name2
- CharacterB Name3
Title 2
- Character Name2
Title 3
- CharacterC Name4

and what I would like to end up with is a file like this:
Character Name,Title 1
Character Name 2,Title 1,Title 2
CharacterB Name 3,Title 1
CharacterC Name4,Title 3
I am trying to figure out how to transform the first file into the second just using standard Unix/Linux type filters, but I am afraid there isn't a simple way to do that.

Is there perhaps some kind of pipeline set of filters that would perform this type of transformation?
 

Members online


Latest posts

Top