Annotation of researchv10no/ipc/mgrs/ns/mkdb/parsesys.sh, revision 1.1.1.1

1.1       root        1: cat /usr/lib/uucp/Systems.local /usr/lib/uucp/Systems.dk /usr/lib/uucp/Systems /usr/lib/uucp/Systems.gen /usr/lib/uucp/Systems.tcp | awk '
                      2: #
                      3: #  Parse systems files.  All lines with the same system name are output
                      4: #  with the same id number.  Output format is
                      5: #      <sysname> TEL,<telno>
                      6: #      <sysname> <dkname> DOMAIN,<domain name>
                      7: #
                      8: BEGIN {
                      9:        line = "";
                     10: }
                     11: #
                     12: #  ignore blank and comment lines
                     13: #
                     14: $0 ~ /^#/      {next;}
                     15: NF<3           {next;}
                     16: #
                     17: #      telephone access
                     18: #
                     19: $3 ~ /ACU/ {
                     20:        line = "TEL," $5
                     21: }
                     22: #
                     23: #      dk system
                     24: #
                     25: $3 ~ /DK/ {
                     26:        if(i = match($5,"\.uucp$"))
                     27:                dk = substr($5,1,i-1);
                     28:        else
                     29:                dk = $5;
                     30:        n = split(dk,a,"/");
                     31:        uid = a[n];
                     32:        for(j=n-1; j>=1; j--)
                     33:                uid = uid "." a[j];
                     34:        line = "DK," dk " DOMAIN," uid ".att.com"
                     35: }
                     36: #
                     37: #      systems that poll us
                     38: #
                     39: $2 ~ /[nN][Ee][Vv][Ee][Rr]/ {
                     40:        line = $1
                     41: }
                     42: #
                     43: #      output the line
                     44: #
                     45: {
                     46:        print $1 " " line " SERVICE,uucp"
                     47: }
                     48: ' | uniq

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.