Index: mttroot/mtt/bin/trans/mtt2reps_txt ================================================================== --- mttroot/mtt/bin/trans/mtt2reps_txt +++ mttroot/mtt/bin/trans/mtt2reps_txt @@ -7,10 +7,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.11 2001/04/28 03:38:36 geraint +## Refined selection of matching patterns - checks for exact match. +## ## Revision 1.10 2000/09/14 07:54:13 peterg ## Removed -e option in echo ## ## Revision 1.9 2000/04/05 08:34:30 peterg ## removed output tab @@ -44,33 +47,36 @@ ## Initial revision ## ############################################################### sep='|'; # Separates the languages from the rest. -representations=`grep '#SUMMARY' $MTTPATH/mtt | awk '{print $2'} | sort -u ` + +## List of all representations (deleting the *) +representations=`grep '#SUMMARY' $MTTPATH/mtt | awk '{sub("\*","+"); print $2'} | sort -u ` + for rep in $representations ; do + Rep=`echo $rep | tr '+' '*'` ## Title should be same for all languages -- but extract the first non-empty version - title=`grep '#SUMMARY' $MTTPATH/mtt | tr '\t' ' ' | grep "[ *]$rep[ *]" | \ + title=`grep '#SUMMARY' $MTTPATH/mtt | tr '\t' ' ' | grep "[ *]$Rep[ *]" | \ awk '{if (NF>2) {for (i=3;i