home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume3 / newspaths < prev    next >
SHell self-extracting ARchive  |  1989-02-03  |  6.9 KB

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: newspaths

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 78 61 | 6e 74 68 21 6d 63 6e 63 |Path: xa|nth!mcnc|
|00000010| 21 67 61 74 65 63 68 21 | 75 6b 6d 61 21 68 75 73 |!gatech!|ukma!hus|
|00000020| 63 36 21 6e 65 63 6e 74 | 63 21 6e 63 6f 61 73 74 |c6!necnt|c!ncoast|
|00000030| 21 61 6c 6c 62 65 72 79 | 0a 46 72 6f 6d 3a 20 6a |!allbery|.From: j|
|00000040| 62 75 63 6b 40 65 70 69 | 6d 61 73 73 2e 45 50 49 |buck@epi|mass.EPI|
|00000050| 2e 43 4f 4d 20 28 4a 6f | 65 20 42 75 63 6b 29 0a |.COM (Jo|e Buck).|
|00000060| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000070| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 53 75 |.sources|.misc.Su|
|00000080| 62 6a 65 63 74 3a 20 76 | 30 33 69 30 36 36 3a 20 |bject: v|03i066: |
|00000090| 50 65 72 6c 20 70 72 6f | 67 72 61 6d 20 66 6f 72 |Perl pro|gram for|
|000000a0| 20 61 63 63 75 6d 75 6c | 61 74 69 6e 67 20 55 73 | accumul|ating Us|
|000000b0| 65 6e 65 74 20 74 72 61 | 66 66 69 63 20 73 74 61 |enet tra|ffic sta|
|000000c0| 74 69 73 74 69 63 73 0a | 4d 65 73 73 61 67 65 2d |tistics.|Message-|
|000000d0| 49 44 3a 20 3c 32 32 35 | 30 40 65 70 69 6d 61 73 |ID: <225|0@epimas|
|000000e0| 73 2e 45 50 49 2e 43 4f | 4d 3e 0a 44 61 74 65 3a |s.EPI.CO|M>.Date:|
|000000f0| 20 32 39 20 4a 75 6e 20 | 38 38 20 30 32 3a 35 34 | 29 Jun |88 02:54|
|00000100| 3a 30 33 20 47 4d 54 0a | 53 65 6e 64 65 72 3a 20 |:03 GMT.|Sender: |
|00000110| 61 6c 6c 62 65 72 79 40 | 6e 63 6f 61 73 74 2e 55 |allbery@|ncoast.U|
|00000120| 55 43 50 0a 52 65 70 6c | 79 2d 54 6f 3a 20 6a 62 |UCP.Repl|y-To: jb|
|00000130| 75 63 6b 40 65 70 69 6d | 61 73 73 2e 45 50 49 2e |uck@epim|ass.EPI.|
|00000140| 43 4f 4d 20 28 4a 6f 65 | 20 42 75 63 6b 29 0a 4f |COM (Joe| Buck).O|
|00000150| 72 67 61 6e 69 7a 61 74 | 69 6f 6e 3a 20 45 6e 74 |rganizat|ion: Ent|
|00000160| 72 6f 70 69 63 20 50 72 | 6f 63 65 73 73 69 6e 67 |ropic Pr|ocessing|
|00000170| 2c 20 49 6e 63 2e 2c 20 | 43 75 70 65 72 74 69 6e |, Inc., |Cupertin|
|00000180| 6f 2c 20 43 41 0a 4c 69 | 6e 65 73 3a 20 32 33 30 |o, CA.Li|nes: 230|
|00000190| 0a 41 70 70 72 6f 76 65 | 64 3a 20 61 6c 6c 62 65 |.Approve|d: allbe|
|000001a0| 72 79 40 6e 63 6f 61 73 | 74 2e 55 55 43 50 0a 0a |ry@ncoas|t.UUCP..|
|000001b0| 50 6f 73 74 69 6e 67 2d | 6e 75 6d 62 65 72 3a 20 |Posting-|number: |
|000001c0| 56 6f 6c 75 6d 65 20 33 | 2c 20 49 73 73 75 65 20 |Volume 3|, Issue |
|000001d0| 36 36 0a 53 75 62 6d 69 | 74 74 65 64 2d 62 79 3a |66.Submi|tted-by:|
|000001e0| 20 22 4a 6f 65 20 42 75 | 63 6b 22 20 3c 6a 62 75 | "Joe Bu|ck" <jbu|
|000001f0| 63 6b 40 65 70 69 6d 61 | 73 73 2e 45 50 49 2e 43 |ck@epima|ss.EPI.C|
|00000200| 4f 4d 3e 0a 41 72 63 68 | 69 76 65 2d 6e 61 6d 65 |OM>.Arch|ive-name|
|00000210| 3a 20 6e 65 77 73 70 61 | 74 68 73 0a 0a 23 21 20 |: newspa|ths..#! |
|00000220| 2f 62 69 6e 2f 73 68 0a | 23 20 54 68 69 73 20 69 |/bin/sh.|# This i|
|00000230| 73 20 61 20 73 68 65 6c | 6c 20 61 72 63 68 69 76 |s a shel|l archiv|
|00000240| 65 2c 20 6d 65 61 6e 69 | 6e 67 3a 0a 23 20 31 2e |e, meani|ng:.# 1.|
|00000250| 20 52 65 6d 6f 76 65 20 | 65 76 65 72 79 74 68 69 | Remove |everythi|
|00000260| 6e 67 20 61 62 6f 76 65 | 20 74 68 65 20 23 21 20 |ng above| the #! |
|00000270| 2f 62 69 6e 2f 73 68 20 | 6c 69 6e 65 2e 0a 23 20 |/bin/sh |line..# |
|00000280| 32 2e 20 53 61 76 65 20 | 74 68 65 20 72 65 73 75 |2. Save |the resu|
|00000290| 6c 74 69 6e 67 20 74 65 | 78 74 20 69 6e 20 61 20 |lting te|xt in a |
|000002a0| 66 69 6c 65 2e 0a 23 20 | 33 2e 20 45 78 65 63 75 |file..# |3. Execu|
|000002b0| 74 65 20 74 68 65 20 66 | 69 6c 65 20 77 69 74 68 |te the f|ile with|
|000002c0| 20 2f 62 69 6e 2f 73 68 | 20 28 6e 6f 74 20 63 73 | /bin/sh| (not cs|
|000002d0| 68 29 20 74 6f 20 63 72 | 65 61 74 65 20 74 68 65 |h) to cr|eate the|
|000002e0| 20 66 69 6c 65 73 3a 0a | 23 09 52 45 41 44 4d 45 | files:.|#.README|
|000002f0| 0a 23 09 6e 65 77 73 70 | 61 74 68 73 0a 23 09 6e |.#.newsp|aths.#.n|
|00000300| 65 77 73 70 61 74 68 73 | 2e 31 0a 23 09 74 77 6f |ewspaths|.1.#.two|
|00000310| 77 61 79 0a 23 20 54 68 | 69 73 20 61 72 63 68 69 |way.# Th|is archi|
|00000320| 76 65 20 63 72 65 61 74 | 65 64 3a 20 54 75 65 20 |ve creat|ed: Tue |
|00000330| 4a 75 6e 20 32 38 20 31 | 39 3a 35 32 3a 31 30 20 |Jun 28 1|9:52:10 |
|00000340| 31 39 38 38 0a 65 78 70 | 6f 72 74 20 50 41 54 48 |1988.exp|ort PATH|
|00000350| 3b 20 50 41 54 48 3d 2f | 62 69 6e 3a 24 50 41 54 |; PATH=/|bin:$PAT|
|00000360| 48 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 52 45 |H.if tes|t -f 'RE|
|00000370| 41 44 4d 45 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |ADME'.th|en..echo|
|00000380| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|00000390| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|000003a0| 69 6e 67 20 66 69 6c 65 | 20 22 27 52 45 41 44 4d |ing file| "'READM|
|000003b0| 45 27 22 0a 65 6c 73 65 | 0a 63 61 74 20 3c 3c 20 |E'".else|.cat << |
|000003c0| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 52 45 41 |\SHAR_EO|F > 'REA|
|000003d0| 44 4d 45 27 0a 48 65 72 | 65 27 73 20 74 68 65 20 |DME'.Her|e's the |
|000003e0| 73 74 75 66 66 20 49 20 | 75 73 65 64 20 74 6f 20 |stuff I |used to |
|000003f0| 67 65 6e 65 72 61 74 65 | 20 74 68 65 20 6d 61 70 |generate| the map|
|00000400| 20 69 6e 20 61 72 74 69 | 63 6c 65 20 3c 32 32 34 | in arti|cle <224|
|00000410| 39 40 65 70 69 6d 61 73 | 73 2e 65 70 69 2e 63 6f |9@epimas|s.epi.co|
|00000420| 6d 3e 2e 0a 48 61 76 65 | 20 66 75 6e 2e 20 20 49 |m>..Have| fun. I|
|00000430| 66 20 6f 6e 6c 79 20 69 | 74 20 64 72 65 77 20 74 |f only i|t drew t|
|00000440| 68 65 20 6d 61 70 73 20 | 74 6f 6f 20 2d 2d 20 6d |he maps |too -- m|
|00000450| 61 79 62 65 20 42 72 69 | 61 6e 20 52 65 69 64 20 |aybe Bri|an Reid |
|00000460| 63 61 6e 20 61 74 74 61 | 63 68 0a 69 74 20 74 6f |can atta|ch.it to|
|00000470| 20 73 6f 6d 65 74 68 69 | 6e 67 2e 0a 0a 2d 20 4a | somethi|ng...- J|
|00000480| 6f 65 0a 0a 53 48 41 52 | 5f 45 4f 46 0a 66 69 20 |oe..SHAR|_EOF.fi |
|00000490| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|000004a0| 74 69 6e 67 20 63 68 65 | 63 6b 0a 69 66 20 74 65 |ting che|ck.if te|
|000004b0| 73 74 20 2d 66 20 27 6e | 65 77 73 70 61 74 68 73 |st -f 'n|ewspaths|
|000004c0| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|000004d0| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|000004e0| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|000004f0| 66 69 6c 65 20 22 27 6e | 65 77 73 70 61 74 68 73 |file "'n|ewspaths|
|00000500| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|00000510| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 6e 65 77 73 |SHAR_EOF| > 'news|
|00000520| 70 61 74 68 73 27 0a 23 | 21 20 2f 75 73 72 2f 62 |paths'.#|! /usr/b|
|00000530| 69 6e 2f 70 65 72 6c 0a | 0a 23 20 43 6f 70 79 72 |in/perl.|.# Copyr|
|00000540| 69 67 68 74 20 31 39 38 | 38 20 62 79 20 4a 6f 73 |ight 198|8 by Jos|
|00000550| 65 70 68 20 54 2e 20 42 | 75 63 6b 2c 20 6a 62 75 |eph T. B|uck, jbu|
|00000560| 63 6b 40 65 70 69 6d 61 | 73 73 2e 65 70 69 2e 63 |ck@epima|ss.epi.c|
|00000570| 6f 6d 2e 0a 23 20 59 6f | 75 20 6d 61 79 20 66 72 |om..# Yo|u may fr|
|00000580| 65 65 6c 79 20 75 73 65 | 20 61 6e 64 20 63 6f 70 |eely use| and cop|
|00000590| 79 20 74 68 69 73 20 70 | 72 6f 67 72 61 6d 20 61 |y this p|rogram a|
|000005a0| 73 20 6c 6f 6e 67 20 61 | 73 20 79 6f 75 0a 23 20 |s long a|s you.# |
|000005b0| 6c 65 61 76 65 20 6d 79 | 20 6e 61 6d 65 20 68 65 |leave my| name he|
|000005c0| 72 65 2e 0a 0a 23 20 6e | 65 77 73 70 61 74 68 73 |re...# n|ewspaths|
|000005d0| 20 2d 2d 20 6e 65 77 73 | 20 70 61 74 68 20 73 74 | -- news| path st|
|000005e0| 61 74 69 73 74 69 63 73 | 20 67 61 74 68 65 72 65 |atistics| gathere|
|000005f0| 72 0a 0a 23 20 54 68 69 | 73 20 70 65 72 6c 20 70 |r..# Thi|s perl p|
|00000600| 72 6f 67 72 61 6d 20 73 | 63 61 6e 73 20 74 68 72 |rogram s|cans thr|
|00000610| 6f 75 67 68 20 61 6c 6c | 20 74 68 65 20 6e 65 77 |ough all| the new|
|00000620| 73 20 6f 6e 20 79 6f 75 | 72 20 73 70 6f 6f 6c 0a |s on you|r spool.|
|00000630| 23 20 28 75 73 69 6e 67 | 20 74 68 65 20 68 69 73 |# (using| the his|
|00000640| 74 6f 72 79 20 66 69 6c | 65 20 74 6f 20 66 69 6e |tory fil|e to fin|
|00000650| 64 20 74 68 65 20 61 72 | 74 69 63 6c 65 73 29 20 |d the ar|ticles) |
|00000660| 61 6e 64 20 70 72 69 6e | 74 73 0a 23 20 6f 75 74 |and prin|ts.# out|
|00000670| 20 61 20 73 6f 72 74 65 | 64 20 6c 69 73 74 20 6f | a sorte|d list o|
|00000680| 66 20 66 72 65 71 75 65 | 6e 63 69 65 73 20 74 68 |f freque|ncies th|
|00000690| 61 74 20 65 61 63 68 20 | 70 61 69 72 20 6f 66 20 |at each |pair of |
|000006a0| 68 6f 73 74 73 0a 23 20 | 61 70 70 65 61 72 73 20 |hosts.# |appears |
|000006b0| 69 6e 20 74 68 65 20 50 | 61 74 68 3a 20 68 65 61 |in the P|ath: hea|
|000006c0| 64 65 72 73 2e 20 20 54 | 68 61 74 20 69 73 2c 20 |ders. T|hat is, |
|000006d0| 69 74 20 64 65 74 65 72 | 6d 69 6e 65 73 20 68 6f |it deter|mines ho|
|000006e0| 77 2c 0a 23 20 6f 6e 20 | 61 76 65 72 61 67 65 2c |w,.# on |average,|
|000006f0| 20 79 6f 75 72 20 6e 65 | 77 73 20 67 65 74 73 20 | your ne|ws gets |
|00000700| 74 6f 20 79 6f 75 2e 0a | 23 0a 23 20 49 66 20 61 |to you..|#.# If a|
|00000710| 6e 20 61 72 67 75 6d 65 | 6e 74 20 69 73 20 67 69 |n argume|nt is gi|
|00000720| 76 65 6e 2c 20 69 74 20 | 69 73 20 74 68 65 20 6e |ven, it |is the n|
|00000730| 61 6d 65 20 6f 66 20 61 | 20 70 72 65 76 69 6f 75 |ame of a| previou|
|00000740| 73 20 6f 75 74 70 75 74 | 0a 23 20 6f 66 20 74 68 |s output|.# of th|
|00000750| 69 73 20 70 72 6f 67 72 | 61 6d 2e 20 20 54 68 65 |is progr|am. The|
|00000760| 20 66 69 67 75 72 65 73 | 20 61 72 65 20 72 65 61 | figures| are rea|
|00000770| 64 20 69 6e 2c 20 61 6e | 64 20 68 6f 73 74 20 70 |d in, an|d host p|
|00000780| 61 69 72 73 0a 23 20 66 | 72 6f 6d 20 61 72 74 69 |airs.# f|rom arti|
|00000790| 63 6c 65 73 20 6e 65 77 | 65 72 20 74 68 61 6e 20 |cles new|er than |
|000007a0| 74 68 65 20 69 6e 70 75 | 74 20 66 69 6c 65 20 61 |the inpu|t file a|
|000007b0| 72 65 20 61 64 64 65 64 | 20 69 6e 2e 0a 23 20 53 |re added| in..# S|
|000007c0| 6f 20 74 68 61 74 20 74 | 68 69 73 20 77 69 6c 6c |o that t|his will|
|000007d0| 20 77 6f 72 6b 2c 20 74 | 68 65 20 66 69 72 73 74 | work, t|he first|
|000007e0| 20 6c 69 6e 65 20 6f 66 | 20 74 68 65 20 6f 75 74 | line of| the out|
|000007f0| 70 75 74 20 6f 66 20 74 | 68 65 0a 23 20 70 72 6f |put of t|he.# pro|
|00000800| 67 72 61 6d 20 69 73 20 | 6f 66 20 74 68 65 20 66 |gram is |of the f|
|00000810| 6f 72 6d 0a 23 20 4c 61 | 73 74 2d 49 44 3a 20 3c |orm.# La|st-ID: <|
|00000820| 35 36 37 39 40 63 68 69 | 6e 65 74 2e 55 55 43 50 |5679@chi|net.UUCP|
|00000830| 3e 0a 23 20 28 77 69 74 | 68 6f 75 74 20 74 68 65 |>.# (wit|hout the|
|00000840| 20 23 20 73 69 67 6e 29 | 2e 20 20 49 74 20 72 65 | # sign)|. It re|
|00000850| 63 6f 72 64 73 20 74 68 | 65 20 6c 61 73 74 20 4d |cords th|e last M|
|00000860| 65 73 73 61 67 65 2d 49 | 44 20 69 6e 20 74 68 65 |essage-I|D in the|
|00000870| 0a 23 20 68 69 73 74 6f | 72 79 20 66 69 6c 65 3b |.# histo|ry file;|
|00000880| 20 74 6f 20 61 64 64 20 | 6e 65 77 20 61 72 74 69 | to add |new arti|
|00000890| 63 6c 65 73 2c 20 77 65 | 20 73 6b 69 70 20 69 6e |cles, we| skip in|
|000008a0| 20 74 68 65 20 68 69 73 | 74 6f 72 79 20 66 69 6c | the his|tory fil|
|000008b0| 65 0a 23 20 75 6e 74 69 | 6c 20 77 65 20 66 69 6e |e.# unti|l we fin|
|000008c0| 64 20 69 74 2e 0a 0a 24 | 73 6b 69 70 20 3d 20 30 |d it...$|skip = 0|
|000008d0| 3b 0a 69 66 20 28 24 23 | 41 52 47 56 20 3e 3d 20 |;.if ($#|ARGV >= |
|000008e0| 30 29 20 7b 0a 20 20 20 | 20 24 6f 66 69 6c 65 20 |0) {. | $ofile |
|000008f0| 3d 20 24 41 52 47 56 5b | 30 5d 3b 0a 20 20 20 20 |= $ARGV[|0];. |
|00000900| 64 69 65 20 22 43 61 6e | 27 74 20 6f 70 65 6e 20 |die "Can|'t open |
|00000910| 24 6f 66 69 6c 65 21 5c | 6e 22 20 75 6e 6c 65 73 |$ofile!\|n" unles|
|00000920| 73 20 6f 70 65 6e 20 28 | 6f 66 2c 20 24 6f 66 69 |s open (|of, $ofi|
|00000930| 6c 65 29 3b 0a 23 20 46 | 69 72 73 74 20 6c 69 6e |le);.# F|irst lin|
|00000940| 65 20 6d 75 73 74 20 63 | 6f 6e 74 61 69 6e 20 6c |e must c|ontain l|
|00000950| 61 73 74 20 6d 73 67 69 | 64 20 74 6f 20 75 73 65 |ast msgi|d to use|
|00000960| 2e 0a 20 20 20 20 24 5f | 20 3d 20 3c 6f 66 3e 3b |.. $_| = <of>;|
|00000970| 0a 20 20 20 20 28 24 6b | 65 79 2c 20 24 6c 61 73 |. ($k|ey, $las|
|00000980| 74 5f 69 64 29 20 3d 20 | 73 70 6c 69 74 20 28 27 |t_id) = |split ('|
|00000990| 20 27 29 3b 0a 20 20 20 | 20 64 69 65 20 22 49 6e | ');. | die "In|
|000009a0| 76 61 6c 69 64 20 69 6e | 70 75 74 20 66 69 6c 65 |valid in|put file|
|000009b0| 20 66 6f 72 6d 61 74 21 | 5c 6e 22 20 69 66 20 28 | format!|\n" if (|
|000009c0| 24 6b 65 79 20 6e 65 20 | 22 4c 61 73 74 2d 49 44 |$key ne |"Last-ID|
|000009d0| 3a 22 29 3b 0a 20 20 20 | 20 24 73 6b 69 70 20 3d |:");. | $skip =|
|000009e0| 20 31 3b 0a 23 20 52 65 | 61 64 20 69 6e 20 74 68 | 1;.# Re|ad in th|
|000009f0| 65 20 6f 6c 64 20 66 69 | 6c 65 2e 0a 20 20 20 20 |e old fi|le.. |
|00000a00| 77 68 69 6c 65 20 28 3c | 6f 66 3e 29 20 7b 0a 09 |while (<|of>) {..|
|00000a10| 28 24 63 6e 74 2c 20 24 | 70 61 69 72 29 20 3d 20 |($cnt, $|pair) = |
|00000a20| 73 70 6c 69 74 28 27 20 | 27 29 3b 0a 09 24 70 63 |split(' |');..$pc|
|00000a30| 6f 75 6e 74 7b 24 70 61 | 69 72 7d 20 3d 20 24 63 |ount{$pa|ir} = $c|
|00000a40| 6e 74 3b 0a 20 20 20 20 | 7d 0a 7d 0a 23 20 4c 65 |nt;. |}.}.# Le|
|00000a50| 74 27 73 20 67 6f 2e 0a | 0a 64 69 65 20 22 43 61 |t's go..|.die "Ca|
|00000a60| 6e 27 74 20 6f 70 65 6e | 20 68 69 73 74 6f 72 79 |n't open| history|
|00000a70| 20 66 69 6c 65 21 5c 6e | 22 20 75 6e 6c 65 73 73 | file!\n|" unless|
|00000a80| 20 6f 70 65 6e 20 28 68 | 69 73 74 2c 20 22 2f 75 | open (h|ist, "/u|
|00000a90| 73 72 2f 6c 69 62 2f 6e | 65 77 73 2f 68 69 73 74 |sr/lib/n|ews/hist|
|00000aa0| 6f 72 79 22 29 3b 0a 64 | 69 65 20 22 43 61 6e 27 |ory");.d|ie "Can'|
|00000ab0| 74 20 63 64 20 74 6f 20 | 6e 65 77 73 20 73 70 6f |t cd to |news spo|
|00000ac0| 6f 6c 20 64 69 72 65 63 | 74 6f 72 79 21 5c 6e 22 |ol direc|tory!\n"|
|00000ad0| 20 75 6e 6c 65 73 73 20 | 63 68 64 69 72 20 28 22 | unless |chdir ("|
|00000ae0| 2f 75 73 72 2f 73 70 6f | 6f 6c 2f 6e 65 77 73 22 |/usr/spo|ol/news"|
|00000af0| 29 3b 0a 0a 24 6e 70 20 | 3d 20 24 6e 6c 6f 63 61 |);..$np |= $nloca|
|00000b00| 6c 20 3d 20 30 3b 0a 77 | 68 69 6c 65 20 28 3c 68 |l = 0;.w|hile (<h|
|00000b10| 69 73 74 3e 29 20 7b 0a | 23 0a 23 20 24 5f 20 63 |ist>) {.|#.# $_ c|
|00000b20| 6f 6e 74 61 69 6e 73 20 | 61 20 6c 69 6e 65 20 66 |ontains |a line f|
|00000b30| 72 6f 6d 20 74 68 65 20 | 68 69 73 74 6f 72 79 20 |rom the |history |
|00000b40| 66 69 6c 65 2e 20 20 50 | 61 72 73 65 20 69 74 2e |file. P|arse it.|
|00000b50| 0a 23 20 53 6b 69 70 20 | 69 74 20 69 66 20 74 68 |.# Skip |it if th|
|00000b60| 65 20 61 72 74 69 63 6c | 65 20 68 61 73 20 62 65 |e articl|e has be|
|00000b70| 65 6e 20 63 61 6e 63 65 | 6c 6c 65 64 20 6f 72 20 |en cance|lled or |
|00000b80| 65 78 70 69 72 65 64 0a | 23 20 49 66 20 74 68 65 |expired.|# If the|
|00000b90| 20 24 73 6b 69 70 20 66 | 6c 61 67 20 69 73 20 74 | $skip f|lag is t|
|00000ba0| 72 75 65 2c 20 77 65 20 | 73 6b 69 70 20 75 6e 74 |rue, we |skip unt|
|00000bb0| 69 6c 20 77 65 20 68 61 | 76 65 20 74 68 65 20 72 |il we ha|ve the r|
|00000bc0| 69 67 68 74 20 6d 73 67 | 69 64 0a 23 0a 20 20 20 |ight msg|id.#. |
|00000bd0| 20 28 24 69 64 2c 20 24 | 64 61 74 65 2c 20 24 74 | ($id, $|date, $t|
|00000be0| 69 6d 65 2c 20 24 66 69 | 6c 65 29 20 3d 20 73 70 |ime, $fi|le) = sp|
|00000bf0| 6c 69 74 20 28 27 20 27 | 29 3b 0a 20 20 20 20 6e |lit (' '|);. n|
|00000c00| 65 78 74 20 69 66 20 28 | 24 66 69 6c 65 20 65 71 |ext if (|$file eq|
|00000c10| 20 27 63 61 6e 63 65 6c | 6c 65 64 27 20 7c 7c 20 | 'cancel|led' || |
|00000c20| 24 66 69 6c 65 20 65 71 | 20 27 27 29 3b 0a 20 20 |$file eq| '');. |
|00000c30| 20 20 69 66 20 28 24 73 | 6b 69 70 29 20 7b 0a 09 | if ($s|kip) {..|
|00000c40| 69 66 20 28 24 69 64 20 | 65 71 20 24 6c 61 73 74 |if ($id |eq $last|
|00000c50| 5f 69 64 29 20 7b 20 24 | 73 6b 69 70 20 3d 20 30 |_id) { $|skip = 0|
|00000c60| 3b 20 7d 0a 09 6e 65 78 | 74 3b 0a 20 20 20 20 7d |; }..nex|t;. }|
|00000c70| 0a 23 0a 23 20 66 6f 72 | 6d 61 74 20 6f 66 20 66 |.#.# for|mat of f|
|00000c80| 69 65 6c 64 20 69 73 20 | 6c 69 6b 65 20 63 6f 6d |ield is |like com|
|00000c90| 70 2e 73 6f 75 72 63 65 | 73 2e 75 6e 69 78 2f 32 |p.source|s.unix/2|
|00000ca0| 33 34 35 20 2e 20 20 47 | 65 74 20 6e 67 20 61 6e |345 . G|et ng an|
|00000cb0| 64 20 66 69 6c 65 6e 61 | 6d 65 2e 0a 23 0a 20 20 |d filena|me..#. |
|00000cc0| 20 20 28 24 6e 67 2c 20 | 24 6e 29 20 3d 20 73 70 | ($ng, |$n) = sp|
|00000cd0| 6c 69 74 20 28 2f 5c 2f | 2f 2c 20 24 66 69 6c 65 |lit (/\/|/, $file|
|00000ce0| 29 3b 0a 20 20 20 20 24 | 66 69 6c 65 20 3d 7e 20 |);. $|file =~ |
|00000cf0| 74 72 25 2e 25 2f 25 3b | 0a 23 0a 23 20 54 68 65 |tr%.%/%;|.#.# The|
|00000d00| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 6d 61 79 20 62 | followi|ng may b|
|00000d10| 65 20 75 73 65 64 20 74 | 6f 20 73 6b 69 70 20 61 |e used t|o skip a|
|00000d20| 6e 79 20 6c 6f 63 61 6c | 20 67 72 6f 75 70 73 2e |ny local| groups.|
|00000d30| 20 20 48 65 72 65 2c 20 | 77 65 0a 23 20 73 6b 69 | Here, |we.# ski|
|00000d40| 70 20 67 72 6f 75 70 20 | 6e 61 6d 65 73 20 62 65 |p group |names be|
|00000d50| 67 69 6e 6e 69 6e 67 20 | 77 69 74 68 20 22 65 70 |ginning |with "ep|
|00000d60| 69 22 20 6f 72 20 22 73 | 75 22 2e 20 20 43 68 61 |i" or "s|u". Cha|
|00000d70| 6e 67 65 20 74 6f 20 73 | 75 69 74 20 74 61 73 74 |nge to s|uit tast|
|00000d80| 65 2e 0a 23 0a 20 20 20 | 20 6e 65 78 74 20 69 66 |e..#. | next if|
|00000d90| 20 24 6e 67 20 3d 7e 20 | 2f 5e 65 70 69 7c 5e 73 | $ng =~ |/^epi|^s|
|00000da0| 75 2f 3b 0a 20 20 20 20 | 6e 65 78 74 20 75 6e 6c |u/;. |next unl|
|00000db0| 65 73 73 20 6f 70 65 6e | 20 28 61 72 74 2c 20 24 |ess open| (art, $|
|00000dc0| 66 69 6c 65 29 3b 09 23 | 20 73 6b 69 70 20 69 66 |file);.#| skip if|
|00000dd0| 20 63 61 6e 6e 6f 74 20 | 6f 70 65 6e 20 66 69 6c | cannot |open fil|
|00000de0| 65 0a 23 0a 23 20 41 72 | 74 69 63 6c 65 20 4f 4b |e.#.# Ar|ticle OK|
|00000df0| 2e 20 20 47 65 74 20 69 | 74 73 20 70 61 74 68 2e |. Get i|ts path.|
|00000e00| 0a 20 20 20 20 77 68 69 | 6c 65 20 28 3c 61 72 74 |. whi|le (<art|
|00000e10| 3e 29 20 7b 0a 20 20 20 | 20 20 20 20 20 28 24 68 |>) {. | ($h|
|00000e20| 74 79 70 65 2c 20 24 68 | 76 61 6c 75 65 29 20 3d |type, $h|value) =|
|00000e30| 20 73 70 6c 69 74 20 28 | 27 20 27 29 3b 0a 09 69 | split (|' ');..i|
|00000e40| 66 20 28 24 68 74 79 70 | 65 20 65 71 20 22 50 61 |f ($htyp|e eq "Pa|
|00000e50| 74 68 3a 22 29 20 7b 0a | 23 20 57 65 20 68 61 76 |th:") {.|# We hav|
|00000e60| 65 20 74 68 65 20 70 61 | 74 68 2c 20 69 6e 20 68 |e the pa|th, in h|
|00000e70| 76 61 6c 75 65 2e 0a 09 | 20 20 20 20 24 6e 70 2b |value...| $np+|
|00000e80| 2b 3b 0a 09 20 20 20 20 | 40 70 61 74 68 20 3d 20 |+;.. |@path = |
|00000e90| 73 70 6c 69 74 20 28 2f | 21 2f 2c 20 24 68 76 61 |split (/|!/, $hva|
|00000ea0| 6c 75 65 29 3b 0a 23 20 | 48 61 6e 64 6c 65 20 6c |lue);.# |Handle l|
|00000eb0| 6f 63 61 6c 6c 79 20 70 | 6f 73 74 65 64 20 61 72 |ocally p|osted ar|
|00000ec0| 74 69 63 6c 65 73 2e 0a | 09 20 20 20 20 69 66 20 |ticles..|. if |
|00000ed0| 28 24 23 70 61 74 68 20 | 3c 20 32 29 20 7b 20 24 |($#path |< 2) { $|
|00000ee0| 6e 6c 6f 63 61 6c 2b 2b | 3b 20 6c 61 73 74 3b 7d |nlocal++|; last;}|
|00000ef0| 0a 23 20 43 72 65 61 74 | 65 20 61 6e 64 20 63 6f |.# Creat|e and co|
|00000f00| 75 6e 74 20 70 61 69 72 | 73 2e 0a 09 20 20 20 20 |unt pair|s... |
|00000f10| 66 6f 72 20 28 24 69 20 | 3d 20 30 3b 20 24 69 20 |for ($i |= 0; $i |
|00000f20| 3c 20 24 23 70 61 74 68 | 20 2d 20 31 3b 20 24 69 |< $#path| - 1; $i|
|00000f30| 2b 2b 29 20 7b 0a 09 09 | 24 70 61 69 72 20 3d 20 |++) {...|$pair = |
|00000f40| 24 70 61 74 68 5b 24 69 | 5d 20 2e 20 22 21 22 20 |$path[$i|] . "!" |
|00000f50| 2e 20 24 70 61 74 68 5b | 24 69 2b 31 5d 3b 0a 09 |. $path[|$i+1];..|
|00000f60| 09 24 70 63 6f 75 6e 74 | 7b 24 70 61 69 72 7d 20 |.$pcount|{$pair} |
|00000f70| 2b 3d 20 31 3b 0a 09 20 | 20 20 20 7d 0a 09 20 20 |+= 1;.. | }.. |
|00000f80| 20 20 6c 61 73 74 3b 0a | 09 7d 0a 20 20 20 20 7d | last;.|.}. }|
|00000f90| 0a 7d 0a 23 20 4d 61 6b | 65 20 73 75 72 65 20 70 |.}.# Mak|e sure p|
|00000fa0| 72 69 6e 74 20 6d 65 73 | 73 61 67 65 20 63 6f 6d |rint mes|sage com|
|00000fb0| 65 73 20 6f 75 74 20 62 | 65 66 6f 72 65 20 73 6f |es out b|efore so|
|00000fc0| 72 74 20 64 61 74 61 2e | 0a 24 7c 20 3d 20 31 3b |rt data.|.$| = 1;|
|00000fd0| 0a 70 72 69 6e 74 20 22 | 4c 61 73 74 2d 49 44 3a |.print "|Last-ID:|
|00000fe0| 20 24 69 64 5c 6e 22 3b | 0a 24 7c 20 3d 20 30 3b | $id\n";|.$| = 0;|
|00000ff0| 0a 23 20 77 72 69 74 65 | 20 74 68 65 20 64 61 74 |.# write| the dat|
|00001000| 61 20 6f 75 74 2c 20 73 | 6f 72 74 65 64 2e 20 20 |a out, s|orted. |
|00001010| 4f 70 65 6e 20 61 20 70 | 69 70 65 2e 0a 64 69 65 |Open a p|ipe..die|
|00001020| 20 22 43 61 6e 27 74 20 | 65 78 65 63 20 73 6f 72 | "Can't |exec sor|
|00001030| 74 21 5c 6e 22 20 75 6e | 6c 65 73 73 20 6f 70 65 |t!\n" un|less ope|
|00001040| 6e 20 28 73 6f 72 74 2c | 20 22 7c 73 6f 72 74 20 |n (sort,| "|sort |
|00001050| 2d 6e 72 22 29 3b 0a 0a | 77 68 69 6c 65 20 28 28 |-nr");..|while ((|
|00001060| 24 70 61 69 72 2c 20 24 | 6e 29 20 3d 20 65 61 63 |$pair, $|n) = eac|
|00001070| 68 20 28 70 63 6f 75 6e | 74 29 29 20 7b 0a 20 20 |h (pcoun|t)) {. |
|00001080| 20 20 70 72 69 6e 74 66 | 20 73 6f 72 74 20 28 22 | printf| sort ("|
|00001090| 25 36 64 20 25 73 5c 6e | 22 2c 20 24 6e 2c 20 24 |%6d %s\n|", $n, $|
|000010a0| 70 61 69 72 29 3b 0a 7d | 0a 63 6c 6f 73 65 20 73 |pair);.}|.close s|
|000010b0| 6f 72 74 3b 0a 53 48 41 | 52 5f 45 4f 46 0a 66 69 |ort;.SHA|R_EOF.fi|
|000010c0| 20 23 20 65 6e 64 20 6f | 66 20 6f 76 65 72 77 72 | # end o|f overwr|
|000010d0| 69 74 69 6e 67 20 63 68 | 65 63 6b 0a 69 66 20 74 |iting ch|eck.if t|
|000010e0| 65 73 74 20 2d 66 20 27 | 6e 65 77 73 70 61 74 68 |est -f '|newspath|
|000010f0| 73 2e 31 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |s.1'.the|n..echo |
|00001100| 73 68 61 72 3a 20 77 69 | 6c 6c 20 6e 6f 74 20 6f |shar: wi|ll not o|
|00001110| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00001120| 6e 67 20 66 69 6c 65 20 | 22 27 6e 65 77 73 70 61 |ng file |"'newspa|
|00001130| 74 68 73 2e 31 27 22 0a | 65 6c 73 65 0a 63 61 74 |ths.1'".|else.cat|
|00001140| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|00001150| 27 6e 65 77 73 70 61 74 | 68 73 2e 31 27 0a 2e 54 |'newspat|hs.1'..T|
|00001160| 48 20 4e 45 57 53 50 41 | 54 48 53 20 31 20 35 2f |H NEWSPA|THS 1 5/|
|00001170| 33 31 2f 38 38 0a 2e 53 | 48 20 22 4e 41 4d 45 22 |31/88..S|H "NAME"|
|00001180| 0a 6e 65 77 73 70 61 74 | 68 73 20 5c 2d 20 63 6f |.newspat|hs \- co|
|00001190| 6c 6c 65 63 74 20 68 6f | 73 74 20 63 6f 6e 6e 65 |llect ho|st conne|
|000011a0| 63 74 69 76 69 74 79 20 | 69 6e 66 6f 72 6d 61 74 |ctivity |informat|
|000011b0| 69 6f 6e 20 66 72 6f 6d | 20 55 73 65 6e 65 74 20 |ion from| Usenet |
|000011c0| 61 72 74 69 63 6c 65 73 | 0a 2e 53 48 20 22 53 59 |articles|..SH "SY|
|000011d0| 4e 4f 50 53 49 53 22 0a | 2e 42 20 6e 65 77 73 70 |NOPSIS".|.B newsp|
|000011e0| 61 74 68 73 0a 5b 0a 2e | 49 20 70 72 65 76 5f 6f |aths.[..|I prev_o|
|000011f0| 75 74 0a 5d 0a 2e 53 48 | 20 22 44 45 53 43 52 49 |ut.]..SH| "DESCRI|
|00001200| 50 54 49 4f 4e 22 0a 2e | 49 20 4e 65 77 73 70 61 |PTION"..|I Newspa|
|00001210| 74 68 73 0a 73 63 61 6e | 73 20 74 68 65 20 68 69 |ths.scan|s the hi|
|00001220| 73 74 6f 72 79 20 66 69 | 6c 65 2c 20 69 6e 0a 2e |story fi|le, in..|
|00001230| 49 52 20 2f 75 73 72 2f | 6c 69 62 2f 6e 65 77 73 |IR /usr/|lib/news|
|00001240| 2f 68 69 73 74 6f 72 79 | 20 2c 0a 75 73 69 6e 67 |/history| ,.using|
|00001250| 20 69 74 20 74 6f 20 6c | 6f 63 61 74 65 20 55 73 | it to l|ocate Us|
|00001260| 65 6e 65 74 20 61 72 74 | 69 63 6c 65 73 2e 20 20 |enet art|icles. |
|00001270| 46 6f 72 20 65 61 63 68 | 20 61 72 74 69 63 6c 65 |For each| article|
|00001280| 2c 20 74 68 65 20 50 61 | 74 68 3a 0a 68 65 61 64 |, the Pa|th:.head|
|00001290| 65 72 20 69 73 20 72 65 | 61 64 2c 20 61 6e 64 20 |er is re|ad, and |
|000012a0| 73 70 6c 69 74 20 75 70 | 20 69 6e 74 6f 20 69 74 |split up| into it|
|000012b0| 73 20 63 6f 6e 73 74 69 | 74 75 65 6e 74 20 68 6f |s consti|tuent ho|
|000012c0| 73 74 20 70 61 69 72 73 | 2e 0a 41 6e 20 61 73 73 |st pairs|..An ass|
|000012d0| 6f 63 69 61 74 69 76 65 | 20 61 72 72 61 79 20 6b |ociative| array k|
|000012e0| 65 65 70 73 20 74 72 61 | 63 6b 20 6f 66 20 68 6f |eeps tra|ck of ho|
|000012f0| 77 20 6d 61 6e 79 20 74 | 69 6d 65 73 20 65 61 63 |w many t|imes eac|
|00001300| 68 20 70 61 69 72 20 6f | 66 0a 68 6f 73 74 73 20 |h pair o|f.hosts |
|00001310| 61 70 70 65 61 72 73 20 | 69 6e 20 61 20 50 61 74 |appears |in a Pat|
|00001320| 68 3a 20 68 65 61 64 65 | 72 2e 20 20 45 76 65 72 |h: heade|r. Ever|
|00001330| 79 20 61 72 74 69 63 6c | 65 20 69 6e 20 74 68 65 |y articl|e in the|
|00001340| 20 68 69 73 74 6f 72 79 | 20 66 69 6c 65 20 69 73 | history| file is|
|00001350| 0a 73 63 61 6e 6e 65 64 | 2e 0a 2e 50 50 0a 54 68 |.scanned|...PP.Th|
|00001360| 65 20 6f 75 74 70 75 74 | 20 66 6f 72 6d 61 74 20 |e output| format |
|00001370| 63 6f 6e 73 69 73 74 73 | 20 6f 66 20 74 68 65 20 |consists| of the |
|00001380| 6c 61 73 74 20 4d 65 73 | 73 61 67 65 2d 49 44 20 |last Mes|sage-ID |
|00001390| 69 6e 20 74 68 65 20 68 | 69 73 74 6f 72 79 20 66 |in the h|istory f|
|000013a0| 69 6c 65 2c 0a 66 6f 6c | 6c 6f 77 65 64 20 62 79 |ile,.fol|lowed by|
|000013b0| 20 61 20 73 6f 72 74 65 | 64 20 6c 69 73 74 20 6f | a sorte|d list o|
|000013c0| 66 20 68 6f 73 74 20 70 | 61 69 72 73 20 61 6e 64 |f host p|airs and|
|000013d0| 20 63 6f 75 6e 74 73 2e | 20 20 48 65 72 65 27 73 | counts.| Here's|
|000013e0| 20 61 20 73 61 6d 70 6c | 65 3a 0a 2e 73 70 0a 2e | a sampl|e:..sp..|
|000013f0| 6e 66 0a 4c 61 73 74 2d | 49 44 3a 20 3c 32 34 35 |nf.Last-|ID: <245|
|00001400| 32 34 40 6f 6c 69 76 65 | 62 2e 6f 6c 69 76 65 74 |24@olive|b.olivet|
|00001410| 74 69 2e 63 6f 6d 3e 0a | 20 34 32 38 31 34 20 65 |ti.com>.| 42814 e|
|00001420| 70 69 6d 61 73 73 21 70 | 79 72 61 6d 69 64 0a 20 |pimass!p|yramid. |
|00001430| 32 32 36 31 30 20 70 79 | 72 61 6d 69 64 21 61 6d |22610 py|ramid!am|
|00001440| 65 73 0a 20 31 32 38 32 | 34 20 70 79 72 61 6d 69 |es. 1282|4 pyrami|
|00001450| 64 21 64 65 63 77 72 6c | 0a 20 20 37 38 35 34 20 |d!decwrl|. 7854 |
|00001460| 61 6d 65 73 21 6d 61 69 | 6c 72 75 73 0a 20 20 35 |ames!mai|lrus. 5|
|00001470| 34 32 36 20 6f 6c 69 76 | 65 62 21 61 6d 65 73 0a |426 oliv|eb!ames.|
|00001480| 20 20 35 33 39 31 20 61 | 6d 65 73 21 70 61 73 74 | 5391 a|mes!past|
|00001490| 65 75 72 0a 20 20 35 32 | 31 32 20 64 65 63 77 72 |eur. 52|12 decwr|
|000014a0| 6c 21 75 63 62 76 61 78 | 0a 3c 20 6c 6f 74 73 20 |l!ucbvax|.< lots |
|000014b0| 6d 6f 72 65 20 3e 0a 2e | 66 69 0a 2e 50 50 0a 49 |more >..|fi..PP.I|
|000014c0| 66 20 61 6e 20 69 6e 70 | 75 74 20 66 69 6c 65 20 |f an inp|ut file |
|000014d0| 61 72 67 75 6d 65 6e 74 | 20 69 73 20 67 69 76 65 |argument| is give|
|000014e0| 6e 2c 20 69 74 20 73 68 | 6f 75 6c 64 20 62 65 20 |n, it sh|ould be |
|000014f0| 74 68 65 20 6e 61 6d 65 | 20 6f 66 20 61 20 70 72 |the name| of a pr|
|00001500| 65 76 69 6f 75 73 0a 6f | 75 74 70 75 74 20 6f 66 |evious.o|utput of|
|00001510| 0a 2e 49 52 20 6e 65 77 | 73 70 61 74 68 73 20 2e |..IR new|spaths .|
|00001520| 0a 54 68 65 20 66 69 6c | 65 20 61 6e 64 20 63 6f |.The fil|e and co|
|00001530| 75 6e 74 73 20 61 72 65 | 20 72 65 61 64 20 69 6e |unts are| read in|
|00001540| 2c 20 61 6e 64 20 74 68 | 65 20 68 69 73 74 6f 72 |, and th|e histor|
|00001550| 79 20 66 69 6c 65 20 69 | 73 20 73 63 61 6e 6e 65 |y file i|s scanne|
|00001560| 64 20 75 6e 74 69 6c 0a | 74 68 65 20 4c 61 73 74 |d until.|the Last|
|00001570| 2d 49 44 20 69 73 20 66 | 6f 75 6e 64 2e 20 20 4e |-ID is f|ound. N|
|00001580| 6f 72 6d 61 6c 20 70 72 | 6f 63 65 73 73 69 6e 67 |ormal pr|ocessing|
|00001590| 20 62 65 67 69 6e 73 20 | 77 69 74 68 20 74 68 65 | begins |with the|
|000015a0| 20 6e 65 78 74 0a 61 72 | 74 69 63 6c 65 20 67 69 | next.ar|ticle gi|
|000015b0| 76 65 6e 20 69 6e 20 74 | 68 65 20 68 69 73 74 6f |ven in t|he histo|
|000015c0| 72 79 20 66 69 6c 65 2e | 20 20 54 68 65 20 69 64 |ry file.| The id|
|000015d0| 65 61 20 69 73 20 74 6f | 20 62 65 20 61 62 6c 65 |ea is to| be able|
|000015e0| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 0a 74 6f 20 | to cont|inue.to |
|000015f0| 61 63 63 75 6d 75 6c 61 | 74 65 20 74 68 65 20 63 |accumula|te the c|
|00001600| 6f 75 6e 74 73 20 6f 76 | 65 72 20 6c 6f 6e 67 20 |ounts ov|er long |
|00001610| 70 65 72 69 6f 64 73 20 | 6f 66 20 74 69 6d 65 20 |periods |of time |
|00001620| 28 64 65 73 70 69 74 65 | 0a 2e 49 20 65 78 70 69 |(despite|..I expi|
|00001630| 72 65 0a 72 75 6e 73 29 | 20 61 6e 64 20 74 6f 20 |re.runs)| and to |
|00001640| 63 6f 75 6e 74 20 65 61 | 63 68 20 61 72 74 69 63 |count ea|ch artic|
|00001650| 6c 65 20 6f 6e 6c 79 20 | 6f 6e 63 65 2e 20 20 49 |le only |once. I|
|00001660| 74 20 69 73 20 61 6e 20 | 65 72 72 6f 72 20 69 66 |t is an |error if|
|00001670| 20 74 68 65 0a 67 69 76 | 65 6e 20 4d 65 73 73 61 | the.giv|en Messa|
|00001680| 67 65 2d 49 44 20 69 73 | 20 6e 6f 74 20 66 6f 75 |ge-ID is| not fou|
|00001690| 6e 64 20 69 6e 20 74 68 | 65 20 68 69 73 74 6f 72 |nd in th|e histor|
|000016a0| 79 20 66 69 6c 65 2e 0a | 2e 53 48 20 22 53 55 47 |y file..|.SH "SUG|
|000016b0| 47 45 53 54 45 44 20 55 | 53 45 22 0a 45 76 65 72 |GESTED U|SE".Ever|
|000016c0| 79 20 6e 69 67 68 74 2c | 20 66 72 6f 6d 0a 2e 49 |y night,| from..I|
|000016d0| 52 20 63 72 6f 6e 20 2c | 0a 64 6f 0a 2e 6e 66 0a |R cron ,|.do..nf.|
|000016e0| 09 6e 65 77 73 70 61 74 | 68 73 20 6f 6c 64 2d 6f |.newspat|hs old-o|
|000016f0| 75 74 70 75 74 20 3e 20 | 6e 65 77 2d 6f 75 74 70 |utput > |new-outp|
|00001700| 75 74 0a 09 6d 76 20 6e | 65 77 2d 6f 75 74 70 75 |ut..mv n|ew-outpu|
|00001710| 74 20 6f 6c 64 2d 6f 75 | 74 70 75 74 0a 2e 66 69 |t old-ou|tput..fi|
|00001720| 0a 2e 73 70 0a 41 66 74 | 65 72 20 31 20 6d 6f 6e |..sp.Aft|er 1 mon|
|00001730| 74 68 20 6f 66 20 6f 70 | 65 72 61 74 69 6f 6e 20 |th of op|eration |
|00001740| 61 74 0a 2e 49 20 65 70 | 69 6d 61 73 73 20 2c 0a |at..I ep|imass ,.|
|00001750| 74 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 6f 75 |the resu|lting ou|
|00001760| 74 70 75 74 20 69 73 20 | 31 33 35 4b 20 62 79 74 |tput is |135K byt|
|00001770| 65 73 20 6c 6f 6e 67 2e | 0a 2e 53 48 20 41 55 54 |es long.|..SH AUT|
|00001780| 48 4f 52 0a 4a 6f 73 65 | 70 68 20 54 2e 20 42 75 |HOR.Jose|ph T. Bu|
|00001790| 63 6b 2c 20 6a 62 75 63 | 6b 40 65 70 69 6d 61 73 |ck, jbuc|k@epimas|
|000017a0| 73 2e 65 70 69 2e 63 6f | 6d 0a 53 48 41 52 5f 45 |s.epi.co|m.SHAR_E|
|000017b0| 4f 46 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |OF.fi # |end of o|
|000017c0| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|000017d0| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 74 77 6f |.if test| -f 'two|
|000017e0| 77 61 79 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |way'.the|n..echo |
|000017f0| 73 68 61 72 3a 20 77 69 | 6c 6c 20 6e 6f 74 20 6f |shar: wi|ll not o|
|00001800| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00001810| 6e 67 20 66 69 6c 65 20 | 22 27 74 77 6f 77 61 79 |ng file |"'twoway|
|00001820| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|00001830| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 74 77 6f 77 |SHAR_EOF| > 'twow|
|00001840| 61 79 27 0a 23 21 20 2f | 75 73 72 2f 62 69 6e 2f |ay'.#! /|usr/bin/|
|00001850| 70 65 72 6c 0a 23 0a 23 | 20 74 77 6f 77 61 79 20 |perl.#.#| twoway |
|00001860| 2d 2d 20 63 6f 6e 76 65 | 72 74 20 75 6e 69 64 69 |-- conve|rt unidi|
|00001870| 72 65 63 74 69 6f 6e 61 | 6c 20 63 6f 75 6e 74 73 |rectiona|l counts|
|00001880| 20 66 72 6f 6d 20 22 6e | 65 77 73 70 61 74 68 73 | from "n|ewspaths|
|00001890| 22 20 69 6e 74 6f 20 74 | 77 6f 2d 77 61 79 20 63 |" into t|wo-way c|
|000018a0| 6f 75 6e 74 73 0a 23 20 | 55 73 61 67 65 3a 20 74 |ounts.# |Usage: t|
|000018b0| 77 6f 77 61 79 20 66 69 | 6c 65 0a 23 20 77 68 65 |woway fi|le.# whe|
|000018c0| 72 65 20 66 69 6c 65 20 | 69 73 20 61 6e 20 6f 75 |re file |is an ou|
|000018d0| 74 70 75 74 20 66 72 6f | 6d 20 22 6e 65 77 73 70 |tput fro|m "newsp|
|000018e0| 61 74 68 73 22 2e 0a 0a | 24 5f 20 3d 20 3c 3e 3b |aths"...|$_ = <>;|
|000018f0| 09 23 20 53 6b 69 70 20 | 74 68 65 20 4c 61 73 74 |.# Skip |the Last|
|00001900| 2d 49 44 3a 20 6c 69 6e | 65 0a 77 68 69 6c 65 20 |-ID: lin|e.while |
|00001910| 28 3c 3e 29 20 7b 0a 20 | 20 20 20 28 24 6e 2c 20 |(<>) {. | ($n, |
|00001920| 24 70 61 69 72 29 20 3d | 20 73 70 6c 69 74 20 28 |$pair) =| split (|
|00001930| 27 20 27 29 3b 0a 20 20 | 20 20 28 24 61 2c 20 24 |' ');. | ($a, $|
|00001940| 62 29 20 3d 20 73 70 6c | 69 74 20 28 2f 21 2f 2c |b) = spl|it (/!/,|
|00001950| 20 24 70 61 69 72 29 3b | 0a 20 20 20 20 69 66 20 | $pair);|. if |
|00001960| 28 24 61 20 67 74 20 24 | 62 29 20 7b 20 24 70 61 |($a gt $|b) { $pa|
|00001970| 69 72 20 3d 20 24 62 20 | 2e 20 22 21 22 20 2e 20 |ir = $b |. "!" . |
|00001980| 24 61 3b 20 7d 09 23 20 | 61 6c 70 68 61 62 65 74 |$a; }.# |alphabet|
|00001990| 69 63 61 6c 20 6f 72 64 | 65 72 0a 20 20 20 20 24 |ical ord|er. $|
|000019a0| 63 6f 75 6e 74 7b 24 70 | 61 69 72 7d 20 2b 3d 20 |count{$p|air} += |
|000019b0| 24 6e 3b 0a 7d 0a 64 69 | 65 20 22 43 61 6e 27 74 |$n;.}.di|e "Can't|
|000019c0| 20 65 78 65 63 20 73 6f | 72 74 21 5c 6e 22 20 75 | exec so|rt!\n" u|
|000019d0| 6e 6c 65 73 73 20 6f 70 | 65 6e 20 28 73 6f 72 74 |nless op|en (sort|
|000019e0| 2c 20 22 7c 73 6f 72 74 | 20 2d 6e 72 22 29 3b 0a |, "|sort| -nr");.|
|000019f0| 77 68 69 6c 65 20 28 28 | 24 70 61 69 72 2c 20 24 |while ((|$pair, $|
|00001a00| 6e 29 20 3d 20 65 61 63 | 68 20 28 63 6f 75 6e 74 |n) = eac|h (count|
|00001a10| 29 29 20 7b 0a 20 20 20 | 20 70 72 69 6e 74 66 20 |)) {. | printf |
|00001a20| 73 6f 72 74 20 28 22 25 | 35 64 20 25 73 5c 6e 22 |sort ("%|5d %s\n"|
|00001a30| 2c 20 24 6e 2c 20 24 70 | 61 69 72 29 3b 0a 7d 0a |, $n, $p|air);.}.|
|00001a40| 63 6c 6f 73 65 20 73 6f | 72 74 3b 0a 53 48 41 52 |close so|rt;.SHAR|
|00001a50| 5f 45 4f 46 0a 63 68 6d | 6f 64 20 2b 78 20 27 74 |_EOF.chm|od +x 't|
|00001a60| 77 6f 77 61 79 27 0a 66 | 69 20 23 20 65 6e 64 20 |woway'.f|i # end |
|00001a70| 6f 66 20 6f 76 65 72 77 | 72 69 74 69 6e 67 20 63 |of overw|riting c|
|00001a80| 68 65 63 6b 0a 23 09 45 | 6e 64 20 6f 66 20 73 68 |heck.#.E|nd of sh|
|00001a90| 65 6c 6c 20 61 72 63 68 | 69 76 65 0a 65 78 69 74 |ell arch|ive.exit|
|00001aa0| 20 30 0a 2d 2d 20 0a 2d | 20 4a 6f 65 20 42 75 63 | 0.-- .-| Joe Buc|
|00001ab0| 6b 20 20 7b 75 75 6e 65 | 74 2c 75 63 62 76 61 78 |k {uune|t,ucbvax|
|00001ac0| 2c 70 79 72 61 6d 69 64 | 2c 3c 73 6d 61 72 74 2d |,pyramid|,<smart-|
|00001ad0| 73 69 74 65 3e 7d 21 65 | 70 69 6d 61 73 73 2e 65 |site>}!e|pimass.e|
|00001ae0| 70 69 2e 63 6f 6d 21 6a | 62 75 63 6b 0a 6a 62 75 |pi.com!j|buck.jbu|
|00001af0| 63 6b 40 65 70 69 6d 61 | 73 73 2e 65 70 69 2e 63 |ck@epima|ss.epi.c|
|00001b00| 6f 6d 09 4f 6c 64 20 41 | 72 70 61 20 6d 61 69 6c |om.Old A|rpa mail|
|00001b10| 65 72 73 3a 20 6a 62 75 | 63 6b 25 65 70 69 6d 61 |ers: jbu|ck%epima|
|00001b20| 73 73 2e 65 70 69 2e 63 | 6f 6d 40 75 75 6e 65 74 |ss.epi.c|om@uunet|
|00001b30| 2e 75 75 2e 6e 65 74 0a | 09 49 66 20 79 6f 75 20 |.uu.net.|.If you |
|00001b40| 6c 65 61 76 65 20 79 6f | 75 72 20 66 61 74 65 20 |leave yo|ur fate |
|00001b50| 69 6e 20 74 68 65 20 68 | 61 6e 64 73 20 6f 66 20 |in the h|ands of |
|00001b60| 74 68 65 20 67 6f 64 73 | 2c 20 64 6f 6e 27 74 20 |the gods|, don't |
|00001b70| 62 65 20 0a 09 73 75 72 | 70 72 69 73 65 64 20 69 |be ..sur|prised i|
|00001b80| 66 20 74 68 65 79 20 68 | 61 76 65 20 61 20 66 65 |f they h|ave a fe|
|00001b90| 77 20 67 72 69 6e 73 20 | 61 74 20 79 6f 75 72 20 |w grins |at your |
|00001ba0| 65 78 70 65 6e 73 65 2e | 09 2d 20 54 6f 6d 20 52 |expense.|.- Tom R|
|00001bb0| 6f 62 62 69 6e 73 0a | |obbins. | |
+--------+-------------------------+-------------------------+--------+--------+