DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦d6821fe82⟧

    Length: 470 (0x1d6)
    Names: »compair«

Derivation

└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen
    └─ ⟦this⟧ »cph85dist/stat/scripts/compair« 

Hex Dump

0x000…020 23 21 2f 62 69 6e 2f 73 68 0a 23 0a 23 20 63 6f 6d 70 61 72 65 20 61 6c 6c 20 70 61 69 72 73 20   ┆#!/bin/sh # # compare all pairs ┆
0x020…040 6f 66 20 76 61 72 69 61 62 6c 65 73 20 75 73 69 6e 67 20 70 61 69 72 0a 64 61 74 61 3d 24 31 0a   ┆of variables using pair data=$1 ┆
0x040…060 69 66 20 74 65 73 74 20 21 20 2d 73 20 24 64 61 74 61 0a 74 68 65 6e 0a 09 65 63 68 6f 20 07 24   ┆if test ! -s $data then  echo  $┆
0x060…080 30 3a 20 22 4e 6f 20 64 61 74 61 20 66 69 6c 65 20 28 24 64 61 74 61 29 20 6f 72 20 65 6d 70 74   ┆0: "No data file ($data) or empt┆
0x080…0a0 79 20 64 61 74 61 20 66 69 6c 65 22 0a 09 65 78 69 74 20 31 0a 66 69 0a 73 68 69 66 74 0a 63 69   ┆y data file"  exit 1 fi shift ci┆
0x0a0…0c0 3d 31 0a 66 6f 72 20 69 0a 64 6f 0a 09 63 6a 3d 31 0a 09 66 6f 72 20 6a 0a 09 64 6f 0a 09 09 69   ┆=1 for i do  cj=1  for j  do   i┆
0x0c0…0e0 66 20 74 65 73 74 20 24 63 69 20 21 3d 20 24 63 6a 0a 09 09 74 68 65 6e 0a 09 09 09 64 6d 20 73   ┆f test $ci != $cj   then    dm s┆
0x0e0…100 24 63 69 20 73 24 63 6a 20 3c 20 24 64 61 74 61 20 7c 0a 09 09 09 09 70 61 69 72 20 2d 70 73 20   ┆$ci s$cj < $data |     pair -ps ┆
0x100…120 2d 78 20 24 69 20 2d 79 20 24 6a 20 7c 0a 09 09 09 09 70 72 20 2d 68 20 22 56 61 72 69 61 62 6c   ┆-x $i -y $j |     pr -h "Variabl┆
0x120…140 65 73 20 24 63 69 20 28 24 69 29 20 61 6e 64 20 24 63 6a 20 28 24 6a 29 20 69 6e 20 66 69 6c 65   ┆es $ci ($i) and $cj ($j) in file┆
0x140…160 20 24 64 61 74 61 22 0a 09 09 65 6c 73 65 0a 09 09 09 64 6d 20 73 24 63 69 20 3c 20 24 64 61 74   ┆ $data"   else    dm s$ci < $dat┆
0x160…180 61 20 7c 20 64 65 73 63 20 2d 73 6f 68 20 7c 20 70 72 20 2d 68 20 22 56 61 72 69 61 62 6c 65 20   ┆a | desc -soh | pr -h "Variable ┆
0x180…1a0 24 63 69 20 28 24 69 29 20 69 6e 20 66 69 6c 65 20 24 64 61 74 61 22 0a 09 09 66 69 3b 0a 09 09   ┆$ci ($i) in file $data"   fi;   ┆
0x1a0…1c0 63 6a 3d 60 65 63 68 6f 20 24 63 6a 2b 31 20 7c 20 62 63 60 0a 09 64 6f 6e 65 0a 09 63 69 3d 60   ┆cj=`echo $cj+1 | bc`  done  ci=`┆
0x1c0…1d6 65 63 68 6f 20 24 63 69 2b 31 20 7c 20 62 63 60 0a 64 6f 6e 65 0a   ┆echo $ci+1 | bc` done ┆