Getting file names

THE END

Try :

set myLst=$(echo $Lst | sed "s/-run.*.log//g")
set AfullNameLst = "n01-run1.log n01-run2.log n01-run3.log n02-run1.log n02-run2.log"
set fnameLst = `echo $AfullNameLst | sed "s/-run.*.log//g"`
echo $fnameLst

But am getting

fnameLst = n01

instead of

fnameLst = n01 n02
echo 'n01-run1.log n01-run2.log n01-run3.log n02-run1.log n02-run2.log' | sed 's/-run[^ ]*//g'

That's better, but now am getting

fnameLst = n01 n01 n01 n02 n02

rather than the names irrespective of run numbers.

echo 'n01-run1.log n01-run2.log n01-run3.log n02-run1.log n02-run2.log' | sed 's/-run[^ ]*//g' | tr ' ' '\n' | sort -u | tr '\n' ' '

THE END

this sounds like a new question. Are we done with the original question?
If so, don't pig-back threads - open new a new thread for a new unrelated question.

P.S. you will not get much support with the csh-type shells....