> 1. within each block, add the sort keys in front of each
> line (surname, personal name, line number), plus maybe a
> delimiter to make step 3 (below) easier.
> 2. sort
> 3. remove the sort keys added in step 1

Do I understand your suggestion is to tweak the file to look
like

==================================================
[X] 100% Soccer team

Sims, Tim@    [X] 100% Sims, Tim
Sims, Tim@        [X] 100% physical
Sims, Tim@        [X] 100% uniform deposit #31

Smith, Sam@    [  ] 50% Smith, Sam
Smith, Sam@        [  ] 0% physical
Smith, Sam@        [X] 100% uniform deposit

Comer, Hannah@    [  ] 0% Comer, Hannah
Comer, Hannah@        [  ] 0% physical
Comer, Hannah@        [  ] 0% uniform deposit #8

Thornton, Tyler@    [X] 100% Thornton, Tyler
Thornton, Tyler@        [X] 100% physical
Thornton, Tyler@        [X] 100% uniform deposit #35
==================================================

and then running running sort over the remainder?

My attempt to try your suggestion comes up with the
sub-lists being inverted and the spaces between the lines
being moved up to the top (using ":2,$!sort")

==================================================
[X] 100% Soccer team




Comer, Hannah@        [  ] 0% physical
Comer, Hannah@        [  ] 0% uniform deposit #8
Comer, Hannah@    [  ] 0% Comer, Hannah
Sims, Tim@        [X] 100% physical
Sims, Tim@        [X] 100% uniform deposit #31
Sims, Tim@    [X] 100% Sims, Tim
Smith, Sam@        [  ] 0% physical
Smith, Sam@        [X] 100% uniform deposit
Smith, Sam@    [  ] 50% Smith, Sam
Thornton, Tyler@        [X] 100% physical
Thornton, Tyler@        [X] 100% uniform deposit #35
Thornton, Tyler@    [X] 100% Thornton, Tyler
==================================================

which, after undecorating with the names, becomes:

==================================================
[X] 100% Soccer team




        [  ] 0% physical
        [  ] 0% uniform deposit #8
    [  ] 0% Comer, Hannah
        [X] 100% physical
        [X] 100% uniform deposit #31
    [X] 100% Sims, Tim
        [  ] 0% physical
        [X] 100% uniform deposit
    [  ] 50% Smith, Sam
        [X] 100% physical
        [X] 100% uniform deposit #35
    [X] 100% Thornton, Tyler
==================================================

which isn't quite what I understood the OP wanted. :)

though, as always, the error my lay in my understanding of
your solution, rather than in the solution itself...

-tim



Reply via email to