Here is an example of the data I'd like to modify:
John,,
bim,bam,boom
tim,tam,toom
lam,loom,lim
Mary,,
pam,pim,poom
dam,dim,doom*
I try to achieve this:
John,bim,bam,boom
John,tim,tam,toom
John,lam,loom,lim
Mary,pam,pim,poom
Mary,dam,dim,doom
When a name is alone on a line, it becomes a new column in all the rows below til the next name with the same pattern occurs.
I wonder if awk or another tool could help but I'm a bit lost.
I try to make a condition (if columns 2 and 3 are empty, do something) but that looks a bit complicated for me right now.