Dear spell checking friends,

Attached an affix script, that corrects the counts 
of sfx/pfx lines in an affix file.

Kevin, please feel free to add that to the development
tools, if you think, this makes sense.

Thanks, Eleonora
--------------------------------------------
#affnumfix.awk
#  correct SFX, PFX count
# usage: awk -f affnumfix <old_addic_file.aff > new_affix_file.aff
# This software is free software protected by the gnu protection schema
# (C) Eleonora 2005 August
BEGIN {typ = ""; i = 0;}

    { if (substr($1,2,2) != "FX"){
       print $0;
       next;
      }
      if($2 != typ ){
         if(i){
             save_count_line = save_count_line " " i;
             print save_count_line;
             for(j = 0; j < i; j++)
               print lines[j];
             print "";
         }
         save_count_line = $1 " " $2" "$3;
         save_count = $4;
         i = 0;
         counting = 1;
         typ = $2;
      } 
        else{
          lines[i++] = $0;
        }
     }     
         
END {       if(i){
             save_count_line = save_count_line " " i;
             print save_count_line;
             for(j = 0; j < i; j++)
               print lines[j];
             print "";
         }
   }
----------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to