|
|
1.1 ! root 1: echo Making index 1>&2 ! 2: cat $* | awk ' ! 3: # ! 4: # make index of the form: ! 5: # value,K|D|I|N|T ! 6: # ! 7: BEGIN { nc = 0; } ! 8: { ! 9: for(i = 1; i <= NF; i++) { ! 10: if(match($i,",")) { ! 11: n = RSTART +1; ! 12: if(match($i,"^DK")) ! 13: type = "K"; ! 14: else if(match($i,"^SERVICE")) ! 15: continue; ! 16: else ! 17: type = substr($i, 1, 1); ! 18: printf("%s,%s %d\n",substr($i,n),type,nc); ! 19: } else { ! 20: ! 21: printf("%s %d\n", $i,nc); ! 22: } ! 23: } ! 24: nc = nc + length($0) + 1; ! 25: } ! 26: ! 27: ' | sort -u
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.