home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / x / x11p-13.zip / fillblnk.cpp < prev    next >
Text File  |  1991-04-26  |  428b  |  16 lines

  1. /**/#!/bin/sh
  2. echo '#####EOF#####' | cat $2 - $1 |
  3. awk -F: '\
  4. $1 == "#####EOF#####"    { filling = 1; currentItem = 1; lastItem = NR; next; }
  5. filling != "1"    { itemOrder[" " $1] = NR; name[NR] = $1; }
  6. filling == "1"    { rate[itemOrder[$2]] = $1; }
  7. END    {
  8.     for (i = 1; i < lastItem; i++) {
  9.         if (rate[i] != "") {
  10.             printf ("%s: %s\n", rate[i], name[i]);
  11.         } else {
  12.             printf (" 0 trep @ 0.0 msec (0.0/sec): %s\n", name[i]);
  13.         }
  14.     }
  15.     }'
  16.