Help with documentation

I have a list of file names

Set Lst = "n02-z30-3x2drw-run1.log n02-z30-3x2drw-run2.log n02-z30-3x2drw-run3.log n02-z50-3x2drw-run1.log n02-z50-3x2drw-run2.log"

So basically I have the files below

n02-z30-3x2drw-run1.log
n02-z30-3x2drw-run2.log
n02-z30-3x2drw-run3.log
n02-z50-3x2drw-run1.log
n02-z50-3x2drw-run2.log

Each file represents the log file produced by a program called tdarwin. It may happen that one stops the program or the program exits. You can continue running the program from where you had left off and the log file will have appended run1, run2 etc.

Thus

n02-z30-3x2drw-run1.log
n02-z30-3x2drw-run2.log
n02-z30-3x2drw-run3.log

means that the program was run 3 times using the same data and continued three times.

I actually can get the information from all three runs and generate one file with all the relevant information. So basically I get the description of the test as "n02-z30-3x2drw".

So in this case, I have actually run two test cases

n02-z30-3x2drw

and 

n02-z50-3x2drw
 

I want to describe that from the list

Lst = 
n02-z30-3x2drw-run1.log
n02-z30-3x2drw-run2.log
n02-z30-3x2drw-run3.log
n02-z50-3x2drw-run1.log
 n02-z50-3x2drw-run2.log
 

I get

Progs = 
n02-z30-3x2drw
 n02-z50-3x2drw
  
#!/bin/ksh

Lst='n02-z30-3x2drw-run1.log n02-z30-3x2drw-run2.log n02-z30-3x2drw-run3.log n02-z50-3x2drw-run1.log n02-z50-3x2drw-run2.log'

echo $Lst | nawk '{match($0,".*-");a[substr($0,1,RSTART+RLENGTH)]}END {for(i in a) print i}' RS=' '
Lst='n02-z30-3x2drw-run1.log n02-z30-3x2drw-run2.log n02-z30-3x2drw-run3.log n02-z50-3x2drw-run1.log n02-z50-3x2drw-run2.log'
echo $Lst | awk '/run1.log/{sub("-run1.log","");print}' RS=' '