home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / unix / volume04 / savesrc < prev    next >
SHell self-extracting ARchive  |  1988-09-11  |  32.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 6d 6f 64 2e |Newsgrou|ps: mod.|
|00000010| 73 6f 75 72 63 65 73 0a | 53 75 62 6a 65 63 74 3a |sources.|Subject:|
|00000020| 20 54 77 6f 20 74 6f 6f | 6c 73 20 66 6f 72 20 6f | Two too|ls for o|
|00000030| 72 67 61 6e 69 7a 69 6e | 67 20 73 6f 75 72 63 65 |rganizin|g source|
|00000040| 73 20 66 72 6f 6d 20 55 | 53 45 4e 45 54 0a 41 70 |s from U|SENET.Ap|
|00000050| 70 72 6f 76 65 64 3a 20 | 6a 70 6e 40 70 61 6e 64 |proved: |jpn@pand|
|00000060| 61 2e 55 55 43 50 0a 0a | 4d 6f 64 2e 73 6f 75 72 |a.UUCP..|Mod.sour|
|00000070| 63 65 73 3a 20 20 56 6f | 6c 75 6d 65 20 34 2c 20 |ces: Vo|lume 4, |
|00000080| 49 73 73 75 65 20 37 37 | 0a 53 75 62 6d 69 74 74 |Issue 77|.Submitt|
|00000090| 65 64 20 62 79 3a 20 64 | 65 63 76 61 78 21 75 74 |ed by: d|ecvax!ut|
|000000a0| 7a 6f 6f 21 74 6f 72 61 | 6d 21 63 68 72 69 73 0a |zoo!tora|m!chris.|
|000000b0| 0a 23 21 20 2f 62 69 6e | 2f 73 68 0a 23 20 54 68 |.#! /bin|/sh.# Th|
|000000c0| 69 73 20 69 73 20 61 20 | 73 68 65 6c 6c 20 61 72 |is is a |shell ar|
|000000d0| 63 68 69 76 65 2c 20 6d | 65 61 6e 69 6e 67 3a 0a |chive, m|eaning:.|
|000000e0| 23 20 31 2e 20 52 65 6d | 6f 76 65 20 65 76 65 72 |# 1. Rem|ove ever|
|000000f0| 79 74 68 69 6e 67 20 61 | 62 6f 76 65 20 74 68 65 |ything a|bove the|
|00000100| 20 23 21 20 2f 62 69 6e | 2f 73 68 20 6c 69 6e 65 | #! /bin|/sh line|
|00000110| 2e 0a 23 20 32 2e 20 53 | 61 76 65 20 74 68 65 20 |..# 2. S|ave the |
|00000120| 72 65 73 75 6c 74 69 6e | 67 20 74 65 78 74 20 69 |resultin|g text i|
|00000130| 6e 20 61 20 66 69 6c 65 | 2e 0a 23 20 33 2e 20 45 |n a file|..# 3. E|
|00000140| 78 65 63 75 74 65 20 74 | 68 65 20 66 69 6c 65 20 |xecute t|he file |
|00000150| 77 69 74 68 20 2f 62 69 | 6e 2f 73 68 20 28 6e 6f |with /bi|n/sh (no|
|00000160| 74 20 63 73 68 29 20 74 | 6f 20 63 72 65 61 74 65 |t csh) t|o create|
|00000170| 20 74 68 65 20 66 69 6c | 65 73 3a 0a 23 09 52 45 | the fil|es:.#.RE|
|00000180| 41 44 4d 45 0a 23 09 6e | 6f 74 65 0a 23 09 6e 6f |ADME.#.n|ote.#.no|
|00000190| 74 65 2e 31 0a 23 09 73 | 61 76 65 73 72 63 0a 23 |te.1.#.s|avesrc.#|
|000001a0| 09 73 61 76 65 73 72 63 | 2e 31 0a 23 20 54 68 69 |.savesrc|.1.# Thi|
|000001b0| 73 20 61 72 63 68 69 76 | 65 20 63 72 65 61 74 65 |s archiv|e create|
|000001c0| 64 3a 20 46 72 69 20 41 | 70 72 20 32 35 20 30 36 |d: Fri A|pr 25 06|
|000001d0| 3a 35 38 3a 33 31 20 31 | 39 38 36 0a 65 78 70 6f |:58:31 1|986.expo|
|000001e0| 72 74 20 50 41 54 48 3b | 20 50 41 54 48 3d 2f 62 |rt PATH;| PATH=/b|
|000001f0| 69 6e 3a 24 50 41 54 48 | 0a 65 63 68 6f 20 73 68 |in:$PATH|.echo sh|
|00000200| 61 72 3a 20 65 78 74 72 | 61 63 74 69 6e 67 20 22 |ar: extr|acting "|
|00000210| 27 52 45 41 44 4d 45 27 | 22 20 27 28 31 30 32 37 |'README'|" '(1027|
|00000220| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|00000230| 20 74 65 73 74 20 2d 66 | 20 27 52 45 41 44 4d 45 | test -f| 'README|
|00000240| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00000250| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00000260| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|00000270| 66 69 6c 65 20 22 27 52 | 45 41 44 4d 45 27 22 0a |file "'R|EADME'".|
|00000280| 65 6c 73 65 0a 63 61 74 | 20 3c 3c 20 5c 53 48 41 |else.cat| << \SHA|
|00000290| 52 5f 45 4f 46 20 3e 20 | 27 52 45 41 44 4d 45 27 |R_EOF > |'README'|
|000002a0| 0a 09 48 65 72 65 20 61 | 72 65 20 74 77 6f 20 73 |..Here a|re two s|
|000002b0| 68 65 6c 6c 20 70 72 6f | 67 72 61 6d 73 2c 20 22 |hell pro|grams, "|
|000002c0| 73 61 76 65 72 73 63 22 | 20 61 6e 64 20 22 6e 6f |saversc"| and "no|
|000002d0| 74 65 22 20 28 70 6c 75 | 73 20 6d 61 6e 75 61 6c |te" (plu|s manual|
|000002e0| 20 70 61 67 65 73 29 2c | 0a 66 6f 72 20 6f 72 67 | pages),|.for org|
|000002f0| 61 6e 69 7a 69 6e 67 20 | 73 6f 75 72 63 65 73 20 |anizing |sources |
|00000300| 66 72 6f 6d 20 55 73 65 | 6e 65 74 2e 20 20 49 20 |from Use|net. I |
|00000310| 77 72 6f 74 65 20 74 68 | 65 6d 20 74 6f 20 64 65 |wrote th|em to de|
|00000320| 61 6c 20 73 65 6e 73 69 | 62 6c 79 20 77 69 74 68 |al sensi|bly with|
|00000330| 20 6d 79 0a 65 76 65 72 | 2d 67 72 6f 77 69 6e 67 | my.ever|-growing|
|00000340| 20 22 6d 69 73 63 65 6c | 6c 61 6e 65 6f 75 73 20 | "miscel|laneous |
|00000350| 6e 65 74 20 73 6f 75 72 | 63 65 73 22 20 64 69 72 |net sour|ces" dir|
|00000360| 65 63 74 6f 72 79 2c 20 | 61 6e 64 20 68 61 76 65 |ectory, |and have|
|00000370| 20 66 6f 75 6e 64 20 74 | 68 65 6d 0a 65 6e 6f 72 | found t|hem.enor|
|00000380| 6d 6f 75 73 6c 79 20 75 | 73 65 66 75 6c 2e 20 20 |mously u|seful. |
|00000390| 49 20 65 78 70 65 63 74 | 20 6f 74 68 65 72 20 66 |I expect| other f|
|000003a0| 6f 6c 6b 73 20 77 69 6c | 6c 20 66 69 6e 64 20 74 |olks wil|l find t|
|000003b0| 68 65 6d 20 68 65 6c 70 | 66 75 6c 20 74 6f 6f 2e |hem help|ful too.|
|000003c0| 0a 0a 42 61 73 69 63 61 | 6c 6c 79 2c 20 22 73 61 |..Basica|lly, "sa|
|000003d0| 76 65 73 72 63 22 20 77 | 69 6c 6c 20 74 61 6b 65 |vesrc" w|ill take|
|000003e0| 20 61 20 73 69 6e 67 6c | 65 20 70 72 6f 67 72 61 | a singl|e progra|
|000003f0| 6d 20 73 6f 75 72 63 65 | 20 66 69 6c 65 20 6f 72 |m source| file or|
|00000400| 20 61 0a 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 | a.shell| archive|
|00000410| 2c 20 70 6c 61 63 65 20 | 69 74 20 69 6e 20 61 20 |, place |it in a |
|00000420| 64 65 73 69 67 6e 61 74 | 65 64 20 73 6f 75 72 63 |designat|ed sourc|
|00000430| 65 20 64 69 72 65 63 74 | 6f 72 79 20 6f 72 20 73 |e direct|ory or s|
|00000440| 75 62 2d 64 69 72 65 63 | 74 6f 72 79 0a 74 68 65 |ub-direc|tory.the|
|00000450| 72 65 6f 66 2c 20 75 6e | 73 68 61 72 20 69 74 20 |reof, un|shar it |
|00000460| 69 66 20 6e 65 63 65 73 | 73 61 72 79 2c 20 67 65 |if neces|sary, ge|
|00000470| 6e 65 72 61 74 65 20 61 | 20 4d 61 6b 65 66 69 6c |nerate a| Makefil|
|00000480| 65 20 65 6e 74 72 79 20 | 69 66 20 6e 65 63 65 73 |e entry |if neces|
|00000490| 73 61 72 79 2c 0a 70 72 | 6f 6d 70 74 20 66 6f 72 |sary,.pr|ompt for|
|000004a0| 20 61 20 68 61 6c 66 2d | 6c 69 6e 65 20 64 65 73 | a half-|line des|
|000004b0| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 77 68 61 74 |cription| of what|
|000004c0| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 64 6f 65 | the pro|gram doe|
|000004d0| 73 2c 20 61 74 74 65 6d | 70 74 0a 74 6f 20 63 6f |s, attem|pt.to co|
|000004e0| 6d 70 69 6c 65 20 69 74 | 2c 20 67 69 76 65 20 74 |mpile it|, give t|
|000004f0| 68 65 20 75 73 65 72 20 | 61 20 73 68 65 6c 6c 20 |he user |a shell |
|00000500| 74 6f 20 74 77 69 64 64 | 6c 65 20 69 74 20 77 68 |to twidd|le it wh|
|00000510| 65 6e 20 69 74 20 64 6f | 65 73 6e 27 74 0a 77 6f |en it do|esn't.wo|
|00000520| 72 6b 2c 20 61 6e 64 20 | 61 64 64 20 65 6e 74 72 |rk, and |add entr|
|00000530| 69 65 73 20 74 6f 20 61 | 20 66 69 6c 65 20 6f 66 |ies to a| file of|
|00000540| 20 6e 6f 74 65 73 20 69 | 6e 64 69 63 61 74 69 6e | notes i|ndicatin|
|00000550| 67 20 77 68 61 74 20 69 | 74 20 69 73 2c 20 77 68 |g what i|t is, wh|
|00000560| 65 72 65 0a 61 6e 64 20 | 77 68 6f 6d 20 69 74 20 |ere.and |whom it |
|00000570| 63 61 6d 65 20 66 72 6f | 6d 2c 20 77 68 65 6e 20 |came fro|m, when |
|00000580| 69 74 20 61 72 72 69 76 | 65 64 2c 20 61 6e 64 20 |it arriv|ed, and |
|00000590| 77 68 65 74 68 65 72 20 | 6f 72 20 6e 6f 74 20 69 |whether |or not i|
|000005a0| 74 20 77 6f 72 6b 73 2e | 0a 49 74 20 77 69 6c 6c |t works.|.It will|
|000005b0| 20 61 6c 73 6f 20 64 65 | 61 6c 20 73 65 6e 73 69 | also de|al sensi|
|000005c0| 62 6c 79 20 77 69 74 68 | 20 68 65 61 64 65 72 20 |bly with| header |
|000005d0| 66 69 6c 65 73 2c 20 62 | 75 67 73 2f 66 69 78 65 |files, b|ugs/fixe|
|000005e0| 73 2c 20 61 6e 64 20 6d | 61 6e 75 61 6c 20 70 61 |s, and m|anual pa|
|000005f0| 67 65 73 2e 0a 49 74 20 | 63 61 6e 20 62 65 20 75 |ges..It |can be u|
|00000600| 73 65 64 20 64 69 72 65 | 63 74 6c 79 20 66 72 6f |sed dire|ctly fro|
|00000610| 6d 20 22 72 6e 22 20 61 | 73 20 22 7c 20 73 61 76 |m "rn" a|s "| sav|
|00000620| 65 73 72 63 20 64 65 73 | 74 69 6e 61 74 69 6f 6e |esrc des|tination|
|00000630| 22 2e 0a 0a 22 4e 6f 74 | 65 22 20 6d 61 6e 61 67 |"..."Not|e" manag|
|00000640| 65 73 20 74 68 65 20 66 | 69 6c 65 73 20 6f 66 20 |es the f|iles of |
|00000650| 6e 6f 74 65 73 20 6f 6e | 20 74 68 65 20 73 6f 75 |notes on| the sou|
|00000660| 72 63 65 73 2e 0a 0a 09 | 43 68 72 69 73 74 69 6e |rces....|Christin|
|00000670| 65 20 52 6f 62 65 72 74 | 73 6f 6e 20 20 7b 69 68 |e Robert|son {ih|
|00000680| 6e 70 34 2c 6c 69 6e 75 | 73 2c 64 65 63 76 61 78 |np4,linu|s,decvax|
|00000690| 7d 21 75 74 7a 6f 6f 21 | 74 6f 72 61 6d 21 63 68 |}!utzoo!|toram!ch|
|000006a0| 72 69 73 0a 53 48 41 52 | 5f 45 4f 46 0a 69 66 20 |ris.SHAR|_EOF.if |
|000006b0| 74 65 73 74 20 31 30 32 | 37 20 2d 6e 65 20 22 60 |test 102|7 -ne "`|
|000006c0| 77 63 20 2d 63 20 3c 20 | 27 52 45 41 44 4d 45 27 |wc -c < |'README'|
|000006d0| 60 22 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |`".then.|.echo sh|
|000006e0| 61 72 3a 20 65 72 72 6f | 72 20 74 72 61 6e 73 6d |ar: erro|r transm|
|000006f0| 69 74 74 69 6e 67 20 22 | 27 52 45 41 44 4d 45 27 |itting "|'README'|
|00000700| 22 20 27 28 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |" '(shou|ld have |
|00000710| 62 65 65 6e 20 31 30 32 | 37 20 63 68 61 72 61 63 |been 102|7 charac|
|00000720| 74 65 72 73 29 27 0a 66 | 69 0a 66 69 0a 65 63 68 |ters)'.f|i.fi.ech|
|00000730| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|00000740| 6e 67 20 22 27 6e 6f 74 | 65 27 22 20 27 28 32 32 |ng "'not|e'" '(22|
|00000750| 38 35 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |85 chara|cters)'.|
|00000760| 69 66 20 74 65 73 74 20 | 2d 66 20 27 6e 6f 74 65 |if test |-f 'note|
|00000770| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00000780| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00000790| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|000007a0| 66 69 6c 65 20 22 27 6e | 6f 74 65 27 22 0a 65 6c |file "'n|ote'".el|
|000007b0| 73 65 0a 63 61 74 20 3c | 3c 20 5c 53 48 41 52 5f |se.cat <|< \SHAR_|
|000007c0| 45 4f 46 20 3e 20 27 6e | 6f 74 65 27 0a 23 21 2f |EOF > 'n|ote'.#!/|
|000007d0| 62 69 6e 2f 73 68 0a 23 | 0a 23 09 4e 6f 74 65 3a |bin/sh.#|.#.Note:|
|000007e0| 09 20 6d 61 6e 61 67 65 | 20 6e 6f 74 65 73 20 6f |. manage| notes o|
|000007f0| 6e 20 70 72 6f 67 72 61 | 6d 20 73 6f 75 72 63 65 |n progra|m source|
|00000800| 73 0a 23 0a 23 09 09 09 | 20 43 6f 70 79 72 69 67 |s.#.#...| Copyrig|
|00000810| 68 74 20 28 63 29 20 43 | 68 72 69 73 20 52 6f 62 |ht (c) C|hris Rob|
|00000820| 65 72 74 73 6f 6e 20 31 | 39 38 35 0a 23 0a 23 09 |ertson 1|985.#.#.|
|00000830| 54 68 69 73 20 73 63 72 | 69 70 74 20 61 64 64 73 |This scr|ipt adds|
|00000840| 20 6c 69 6e 65 73 20 66 | 72 6f 6d 20 73 74 61 6e | lines f|rom stan|
|00000850| 64 61 72 64 20 69 6e 70 | 75 74 20 74 6f 20 61 20 |dard inp|ut to a |
|00000860| 66 69 6c 65 20 63 61 6c | 6c 65 64 20 4e 4f 54 45 |file cal|led NOTE|
|00000870| 53 0a 23 09 69 6e 20 74 | 68 65 20 63 75 72 72 65 |S.#.in t|he curre|
|00000880| 6e 74 20 64 69 72 65 63 | 74 6f 72 79 2c 20 6f 72 |nt direc|tory, or|
|00000890| 20 76 69 65 77 73 2f 65 | 64 69 74 73 20 74 68 65 | views/e|dits the|
|000008a0| 20 66 69 6c 65 2e 20 20 | 49 74 20 69 73 20 69 6e | file. |It is in|
|000008b0| 74 65 6e 64 65 64 0a 23 | 09 66 6f 72 20 6b 65 65 |tended.#|.for kee|
|000008c0| 70 69 6e 67 20 6e 6f 74 | 65 73 20 6f 6e 20 73 6f |ping not|es on so|
|000008d0| 66 74 77 61 72 65 20 73 | 6c 75 72 70 65 64 20 66 |ftware s|lurped f|
|000008e0| 72 6f 6d 20 74 68 65 20 | 6e 65 74 2e 0a 23 09 54 |rom the |net..#.T|
|000008f0| 68 65 20 66 6f 72 6d 61 | 74 20 6f 66 20 4e 4f 54 |he forma|t of NOT|
|00000900| 45 53 20 69 73 3a 0a 23 | 09 0a 23 09 70 72 6f 67 |ES is:.#|..#.prog|
|00000910| 6e 61 6d 65 3a 09 5b 64 | 61 74 65 5d 20 63 6f 6d |name:.[d|ate] com|
|00000920| 6d 65 6e 74 73 20 2e 2e | 2e 0a 23 09 28 31 20 74 |ments ..|..#.(1 t|
|00000930| 61 62 29 09 6d 6f 72 65 | 20 63 6f 6d 6d 65 6e 74 |ab).more| comment|
|00000940| 73 0a 23 09 28 62 6c 61 | 6e 6b 20 6c 69 6e 65 29 |s.#.(bla|nk line)|
|00000950| 0a 23 0a 23 09 55 73 61 | 67 65 3a 20 20 6e 6f 74 |.#.#.Usa|ge: not|
|00000960| 65 20 5b 2d 65 5d 20 5b | 2d 73 5d 20 5b 2d 72 20 |e [-e] [|-s] [-r |
|00000970| 5b 70 72 6f 67 72 61 6d | 20 2e 2e 2e 5d 5d 0a 23 |[program| ...]].#|
|00000980| 0a 23 09 4e 6f 20 6f 70 | 74 69 6f 6e 73 3a 09 09 |.#.No op|tions:..|
|00000990| 61 64 64 20 61 20 4e 4f | 54 45 2e 0a 23 09 2d 65 |add a NO|TE..#.-e|
|000009a0| 3a 09 09 09 09 65 64 69 | 74 20 74 68 65 20 4e 4f |:....edi|t the NO|
|000009b0| 54 45 53 20 66 69 6c 65 | 2e 0a 23 09 2d 72 3a 09 |TES file|..#.-r:.|
|000009c0| 09 09 09 73 68 6f 77 20 | 61 6c 6c 20 6e 6f 74 65 |...show |all note|
|000009d0| 73 20 6f 6e 20 74 68 65 | 20 67 69 76 65 6e 20 70 |s on the| given p|
|000009e0| 72 6f 67 72 61 6d 28 73 | 29 2c 20 6f 72 20 74 68 |rogram(s|), or th|
|000009f0| 65 20 65 6e 74 69 72 65 | 0a 23 09 09 09 09 09 4e |e entire|.#.....N|
|00000a00| 4f 54 45 53 20 66 69 6c | 65 20 28 75 6e 73 6f 72 |OTES fil|e (unsor|
|00000a10| 74 65 64 29 20 69 66 20 | 6e 6f 20 70 72 6f 67 72 |ted) if |no progr|
|00000a20| 61 6d 20 69 73 20 67 69 | 76 65 6e 2e 0a 23 09 2d |am is gi|ven..#.-|
|00000a30| 73 3a 09 09 09 09 73 68 | 6f 77 20 74 68 65 20 65 |s:....sh|ow the e|
|00000a40| 6e 74 69 72 65 20 4e 4f | 54 45 53 20 66 69 6c 65 |ntire NO|TES file|
|00000a50| 2c 20 73 6f 72 74 65 64 | 20 73 6f 20 61 6c 6c 20 |, sorted| so all |
|00000a60| 6e 6f 74 65 73 20 6f 6e | 20 61 0a 23 09 09 09 09 |notes on| a.#....|
|00000a70| 09 67 69 76 65 6e 20 70 | 72 6f 67 72 61 6d 20 6f |.given p|rogram o|
|00000a80| 63 63 75 72 20 74 6f 67 | 65 74 68 65 72 2e 0a 23 |ccur tog|ether..#|
|00000a90| 0a 0a 50 41 47 45 52 3d | 24 7b 50 41 47 45 52 2d |..PAGER=|${PAGER-|
|00000aa0| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 62 69 6e 2f 6d |/usr/loc|al/bin/m|
|00000ab0| 6f 72 65 7d 0a 63 61 73 | 65 20 22 24 50 41 47 45 |ore}.cas|e "$PAGE|
|00000ac0| 52 22 20 69 6e 0a 09 22 | 22 29 09 09 09 09 09 09 |R" in.."|")......|
|00000ad0| 23 20 69 6e 20 63 61 73 | 65 20 69 74 27 73 20 65 |# in cas|e it's e|
|00000ae0| 78 70 6c 69 63 69 74 6c | 79 20 73 65 74 20 74 6f |xplicitl|y set to|
|00000af0| 20 6e 6f 74 68 69 6e 67 | 0a 09 09 50 41 47 45 52 | nothing|...PAGER|
|00000b00| 3d 63 61 74 0a 09 09 3b | 3b 0a 65 73 61 63 0a 0a |=cat...;|;.esac..|
|00000b10| 63 61 73 65 20 22 24 56 | 49 53 55 41 4c 22 20 69 |case "$V|ISUAL" i|
|00000b20| 6e 0a 09 22 22 29 0a 09 | 09 63 61 73 65 20 22 24 |n.."")..|.case "$|
|00000b30| 45 44 49 54 4f 52 22 20 | 69 6e 0a 09 09 09 22 22 |EDITOR" |in....""|
|00000b40| 29 0a 09 09 09 09 3b 3b | 0a 09 09 09 2a 29 0a 09 |).....;;|....*)..|
|00000b50| 09 09 09 56 49 53 55 41 | 4c 3d 24 45 44 49 54 4f |...VISUA|L=$EDITO|
|00000b60| 52 0a 09 09 09 09 3b 3b | 0a 09 09 65 73 61 63 0a |R.....;;|...esac.|
|00000b70| 09 09 3b 3b 0a 65 73 61 | 63 0a 56 49 53 55 41 4c |..;;.esa|c.VISUAL|
|00000b80| 3d 24 7b 56 49 53 55 41 | 4c 2d 2f 75 73 72 2f 62 |=${VISUA|L-/usr/b|
|00000b90| 69 6e 2f 76 69 7d 0a 63 | 61 73 65 20 22 24 56 49 |in/vi}.c|ase "$VI|
|00000ba0| 53 55 41 4c 22 20 69 6e | 0a 09 22 22 29 09 09 09 |SUAL" in|.."")...|
|00000bb0| 09 09 09 23 20 69 6e 20 | 63 61 73 65 20 69 74 27 |...# in |case it'|
|00000bc0| 73 20 65 78 70 6c 69 63 | 69 74 6c 79 20 73 65 74 |s explic|itly set|
|00000bd0| 20 74 6f 20 6e 6f 74 68 | 69 6e 67 0a 09 09 56 49 | to noth|ing...VI|
|00000be0| 53 55 41 4c 3d 2f 62 69 | 6e 2f 65 64 0a 09 09 3b |SUAL=/bi|n/ed...;|
|00000bf0| 3b 0a 65 73 61 63 0a 0a | 74 72 61 70 20 22 72 6d |;.esac..|trap "rm|
|00000c00| 20 2d 66 20 2f 74 6d 70 | 2f 6e 6f 74 65 24 24 3b | -f /tmp|/note$$;|
|00000c10| 65 78 69 74 22 20 30 20 | 31 20 32 20 33 0a 0a 23 |exit" 0 |1 2 3..#|
|00000c20| 20 66 69 6e 64 20 77 68 | 69 63 68 20 65 63 68 6f | find wh|ich echo|
|00000c30| 20 77 65 27 72 65 20 75 | 73 69 6e 67 0a 0a 63 61 | we're u|sing..ca|
|00000c40| 73 65 20 22 60 65 63 68 | 6f 20 2d 6e 20 66 6f 6f |se "`ech|o -n foo|
|00000c50| 60 22 20 69 6e 0a 09 2d | 6e 2a 29 0a 09 09 63 3d |`" in..-|n*)...c=|
|00000c60| 22 5c 63 22 0a 09 09 6e | 3d 22 22 0a 09 09 3b 3b |"\c"...n|=""...;;|
|00000c70| 0a 09 66 6f 6f 29 0a 09 | 09 63 3d 22 22 0a 09 09 |..foo)..|.c=""...|
|00000c80| 6e 3d 22 2d 6e 22 0a 09 | 09 3b 3b 0a 09 2a 29 0a |n="-n"..|.;;..*).|
|00000c90| 09 09 65 63 68 6f 20 22 | 59 6f 75 72 20 65 63 68 |..echo "|Your ech|
|00000ca0| 6f 20 63 6f 6d 6d 61 6e | 64 20 69 73 20 62 72 6f |o comman|d is bro|
|00000cb0| 6b 65 6e 21 22 0a 09 09 | 63 3d 0a 09 09 6e 3d 0a |ken!"...|c=...n=.|
|00000cc0| 09 09 3b 3b 0a 65 73 61 | 63 0a 0a 75 73 61 67 65 |..;;.esa|c..usage|
|00000cd0| 3d 22 55 73 61 67 65 3a | 20 24 30 20 5b 2d 65 5d |="Usage:| $0 [-e]|
|00000ce0| 20 5b 2d 73 5d 20 5b 2d | 72 20 5b 70 72 6f 67 20 | [-s] [-|r [prog |
|00000cf0| 2e 2e 2e 5d 5d 22 0a 0a | 63 61 73 65 20 22 24 23 |...]]"..|case "$#|
|00000d00| 22 20 69 6e 0a 09 30 29 | 0a 09 09 3b 3b 0a 09 31 |" in..0)|...;;..1|
|00000d10| 29 0a 09 09 63 61 73 65 | 20 22 24 31 22 20 69 6e |)...case| "$1" in|
|00000d20| 0a 09 09 09 2d 72 29 0a | 09 09 09 09 24 50 41 47 |....-r).|....$PAG|
|00000d30| 45 52 20 4e 4f 54 45 53 | 0a 09 09 09 09 65 78 69 |ER NOTES|.....exi|
|00000d40| 74 20 30 0a 09 09 09 09 | 3b 3b 0a 09 09 09 2d 73 |t 0.....|;;....-s|
|00000d50| 29 0a 09 09 09 09 6c 69 | 73 74 3d 22 60 73 65 64 |).....li|st="`sed|
|00000d60| 20 2d 65 20 27 2f 5e 09 | 2f 64 27 20 2d 65 20 27 | -e '/^.|/d' -e '|
|00000d70| 73 2f 3a 2e 2a 2f 2f 27 | 20 4e 4f 54 45 53 20 7c |s/:.*//'| NOTES ||
|00000d80| 20 73 6f 72 74 20 2d 75 | 60 22 0a 09 09 09 09 66 | sort -u|`".....f|
|00000d90| 6f 72 20 69 20 69 6e 20 | 24 6c 69 73 74 0a 09 09 |or i in |$list...|
|00000da0| 09 09 09 64 6f 0a 09 09 | 09 09 09 6e 6f 74 65 20 |...do...|...note |
|00000db0| 2d 72 20 24 69 20 3e 3e | 20 2f 74 6d 70 2f 6e 6f |-r $i >>| /tmp/no|
|00000dc0| 74 65 24 24 0a 09 09 09 | 09 64 6f 6e 65 0a 09 09 |te$$....|.done...|
|00000dd0| 09 09 24 50 41 47 45 52 | 20 2f 74 6d 70 2f 6e 6f |..$PAGER| /tmp/no|
|00000de0| 74 65 24 24 0a 09 09 09 | 09 72 6d 20 2d 66 20 2f |te$$....|.rm -f /|
|00000df0| 74 6d 70 2f 6e 6f 74 65 | 24 24 0a 09 09 09 09 65 |tmp/note|$$.....e|
|00000e00| 78 69 74 20 30 0a 09 09 | 09 09 3b 3b 0a 09 09 09 |xit 0...|..;;....|
|00000e10| 2d 65 29 0a 09 09 09 09 | 24 56 49 53 55 41 4c 20 |-e).....|$VISUAL |
|00000e20| 4e 4f 54 45 53 0a 09 09 | 09 09 65 78 69 74 20 30 |NOTES...|..exit 0|
|00000e30| 0a 09 09 09 09 3b 3b 0a | 09 09 09 2a 29 0a 09 09 |.....;;.|...*)...|
|00000e40| 09 09 65 63 68 6f 20 24 | 75 73 61 67 65 0a 09 09 |..echo $|usage...|
|00000e50| 09 09 65 78 69 74 20 31 | 0a 09 09 09 09 3b 3b 0a |..exit 1|.....;;.|
|00000e60| 09 09 65 73 61 63 0a 09 | 09 3b 3b 0a 09 2a 29 0a |..esac..|.;;..*).|
|00000e70| 09 09 63 61 73 65 20 22 | 24 31 22 20 69 6e 0a 09 |..case "|$1" in..|
|00000e80| 09 09 2d 72 29 0a 09 09 | 09 09 73 68 69 66 74 0a |..-r)...|..shift.|
|00000e90| 09 09 09 09 66 6f 72 20 | 70 72 6f 67 20 69 6e 20 |....for |prog in |
|00000ea0| 24 2a 0a 09 09 09 09 09 | 64 6f 0a 09 09 09 09 09 |$*......|do......|
|00000eb0| 63 61 73 65 20 22 24 50 | 41 47 45 52 22 20 69 6e |case "$P|AGER" in|
|00000ec0| 0a 09 09 09 09 09 09 2a | 63 61 74 29 0a 09 09 09 |.......*|cat)....|
|00000ed0| 09 09 09 09 73 65 64 20 | 2d 6e 20 2d 65 20 22 2f |....sed |-n -e "/|
|00000ee0| 5e 24 7b 70 72 6f 67 7d | 3a 2f 2c 2f 5e 5c 24 2f |^${prog}|:/,/^\$/|
|00000ef0| 70 22 20 4e 4f 54 45 53 | 0a 09 09 09 09 09 09 09 |p" NOTES|........|
|00000f00| 3b 3b 0a 09 09 09 09 09 | 09 2a 29 0a 09 09 09 09 |;;......|.*).....|
|00000f10| 09 09 09 73 65 64 20 2d | 6e 20 2d 65 20 22 2f 5e |...sed -|n -e "/^|
|00000f20| 24 7b 70 72 6f 67 7d 3a | 2f 2c 2f 5e 5c 24 2f 70 |${prog}:|/,/^\$/p|
|00000f30| 22 20 4e 4f 54 45 53 20 | 7c 20 24 50 41 47 45 52 |" NOTES || $PAGER|
|00000f40| 0a 09 09 09 09 09 09 09 | 3b 3b 0a 09 09 09 09 09 |........|;;......|
|00000f50| 65 73 61 63 0a 09 09 09 | 09 64 6f 6e 65 0a 09 09 |esac....|.done...|
|00000f60| 09 09 65 78 69 74 20 30 | 0a 09 09 09 09 3b 3b 0a |..exit 0|.....;;.|
|00000f70| 09 09 09 2a 29 0a 09 09 | 09 09 65 63 68 6f 20 24 |...*)...|..echo $|
|00000f80| 75 73 61 67 65 0a 09 09 | 09 09 65 78 69 74 20 31 |usage...|..exit 1|
|00000f90| 0a 09 09 09 09 3b 3b 0a | 09 09 65 73 61 63 0a 09 |.....;;.|..esac..|
|00000fa0| 09 3b 3b 0a 65 73 61 63 | 0a 64 61 74 65 3d 22 60 |.;;.esac|.date="`|
|00000fb0| 73 65 74 20 2d 20 5c 60 | 64 61 74 65 5c 60 3b 65 |set - \`|date\`;e|
|00000fc0| 63 68 6f 20 24 32 20 24 | 33 20 24 36 60 22 0a 65 |cho $2 $|3 $6`".e|
|00000fd0| 63 68 6f 20 24 6e 20 22 | 50 72 6f 67 72 61 6d 20 |cho $n "|Program |
|00000fe0| 6e 61 6d 65 3a 20 24 63 | 22 0a 72 65 61 64 20 70 |name: $c|".read p|
|00000ff0| 72 6f 67 0a 65 63 68 6f | 20 24 6e 20 22 3e 20 24 |rog.echo| $n "> $|
|00001000| 63 22 0a 72 65 61 64 20 | 6c 69 6e 65 0a 65 63 68 |c".read |line.ech|
|00001010| 6f 20 22 24 7b 70 72 6f | 67 7d 3a 09 5b 24 64 61 |o "${pro|g}:.[$da|
|00001020| 74 65 5d 20 24 6c 69 6e | 65 22 20 3e 3e 20 4e 4f |te] $lin|e" >> NO|
|00001030| 54 45 53 0a 6c 69 6e 65 | 3d 0a 77 68 69 6c 65 20 |TES.line|=.while |
|00001040| 3a 0a 09 64 6f 0a 09 65 | 63 68 6f 20 24 6e 20 22 |:..do..e|cho $n "|
|00001050| 3e 20 24 63 22 0a 09 72 | 65 61 64 20 6c 69 6e 65 |> $c"..r|ead line|
|00001060| 0a 09 63 61 73 65 20 22 | 24 6c 69 6e 65 22 20 69 |..case "|$line" i|
|00001070| 6e 0a 09 09 2e 29 0a 09 | 09 09 62 72 65 61 6b 0a |n....)..|..break.|
|00001080| 09 09 09 3b 3b 0a 09 65 | 73 61 63 0a 09 65 63 68 |...;;..e|sac..ech|
|00001090| 6f 20 22 09 24 6c 69 6e | 65 22 20 3e 3e 20 4e 4f |o ".$lin|e" >> NO|
|000010a0| 54 45 53 0a 64 6f 6e 65 | 0a 65 63 68 6f 20 22 22 |TES.done|.echo ""|
|000010b0| 20 3e 3e 20 4e 4f 54 45 | 53 0a 53 48 41 52 5f 45 | >> NOTE|S.SHAR_E|
|000010c0| 4f 46 0a 69 66 20 74 65 | 73 74 20 32 32 38 35 20 |OF.if te|st 2285 |
|000010d0| 2d 6e 65 20 22 60 77 63 | 20 2d 63 20 3c 20 27 6e |-ne "`wc| -c < 'n|
|000010e0| 6f 74 65 27 60 22 0a 74 | 68 65 6e 0a 09 65 63 68 |ote'`".t|hen..ech|
|000010f0| 6f 20 73 68 61 72 3a 20 | 65 72 72 6f 72 20 74 72 |o shar: |error tr|
|00001100| 61 6e 73 6d 69 74 74 69 | 6e 67 20 22 27 6e 6f 74 |ansmitti|ng "'not|
|00001110| 65 27 22 20 27 28 73 68 | 6f 75 6c 64 20 68 61 76 |e'" '(sh|ould hav|
|00001120| 65 20 62 65 65 6e 20 32 | 32 38 35 20 63 68 61 72 |e been 2|285 char|
|00001130| 61 63 74 65 72 73 29 27 | 0a 66 69 0a 66 69 0a 65 |acters)'|.fi.fi.e|
|00001140| 63 68 6f 20 73 68 61 72 | 3a 20 65 78 74 72 61 63 |cho shar|: extrac|
|00001150| 74 69 6e 67 20 22 27 6e | 6f 74 65 2e 31 27 22 20 |ting "'n|ote.1'" |
|00001160| 27 28 31 36 32 33 20 63 | 68 61 72 61 63 74 65 72 |'(1623 c|haracter|
|00001170| 73 29 27 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |s)'.if t|est -f '|
|00001180| 6e 6f 74 65 2e 31 27 0a | 74 68 65 6e 0a 09 65 63 |note.1'.|then..ec|
|00001190| 68 6f 20 73 68 61 72 3a | 20 77 69 6c 6c 20 6e 6f |ho shar:| will no|
|000011a0| 74 20 6f 76 65 72 2d 77 | 72 69 74 65 20 65 78 69 |t over-w|rite exi|
|000011b0| 73 74 69 6e 67 20 66 69 | 6c 65 20 22 27 6e 6f 74 |sting fi|le "'not|
|000011c0| 65 2e 31 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |e.1'".el|se.cat <|
|000011d0| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 6e |< \SHAR_|EOF > 'n|
|000011e0| 6f 74 65 2e 31 27 0a 2e | 6c 73 20 31 0a 2e 54 48 |ote.1'..|ls 1..TH|
|000011f0| 20 4e 4f 54 45 20 31 20 | 4c 4f 43 41 4c 0a 2e 53 | NOTE 1 |LOCAL..S|
|00001200| 48 20 4e 41 4d 45 0a 6e | 6f 74 65 20 5c 2d 20 6d |H NAME.n|ote \- m|
|00001210| 61 6e 61 67 65 20 6e 6f | 74 65 73 20 6f 6e 20 70 |anage no|tes on p|
|00001220| 72 6f 67 72 61 6d 20 73 | 6f 75 72 63 65 73 0a 2e |rogram s|ources..|
|00001230| 53 48 20 53 59 4e 4f 50 | 53 49 53 0a 5c 66 42 6e |SH SYNOP|SIS.\fBn|
|00001240| 6f 74 65 5c 66 52 20 5b | 5c 66 42 5c 2d 65 5c 66 |ote\fR [|\fB\-e\f|
|00001250| 52 5d 20 5b 5c 66 42 5c | 2d 73 5c 66 52 5d 20 5b |R] [\fB\|-s\fR] [|
|00001260| 5c 66 42 5c 2d 72 5c 66 | 52 20 5b 70 72 6f 67 72 |\fB\-r\f|R [progr|
|00001270| 61 6d 20 2e 2e 2e 5d 5d | 0a 2e 53 48 20 44 45 53 |am ...]]|..SH DES|
|00001280| 43 52 49 50 54 49 4f 4e | 0a 5c 66 49 4e 6f 74 65 |CRIPTION|.\fINote|
|00001290| 5c 66 52 20 69 73 20 61 | 20 73 68 65 6c 6c 20 73 |\fR is a| shell s|
|000012a0| 63 72 69 70 74 20 64 65 | 73 69 67 6e 65 64 20 74 |cript de|signed t|
|000012b0| 6f 20 6d 61 6e 61 67 65 | 20 6e 6f 74 65 73 20 6f |o manage| notes o|
|000012c0| 6e 20 73 6f 75 72 63 65 | 73 2c 20 73 75 63 68 0a |n source|s, such.|
|000012d0| 61 73 20 77 68 61 74 20 | 74 68 65 79 20 61 72 65 |as what |they are|
|000012e0| 2c 20 77 68 65 72 65 20 | 61 6e 64 20 77 68 6f 6d |, where |and whom|
|000012f0| 20 74 68 65 79 20 63 61 | 6d 65 20 66 72 6f 6d 2c | they ca|me from,|
|00001300| 20 77 68 65 6e 20 74 68 | 65 79 20 77 65 72 65 0a | when th|ey were.|
|00001310| 72 65 63 65 69 76 65 64 | 2f 63 72 65 61 74 65 64 |received|/created|
|00001320| 2c 20 61 6e 64 20 77 68 | 65 74 68 65 72 20 6f 72 |, and wh|ether or|
|00001330| 20 6e 6f 74 20 74 68 65 | 79 20 77 6f 72 6b 2e 0a | not the|y work..|
|00001340| 49 74 20 69 73 20 70 72 | 69 6d 61 72 69 6c 79 20 |It is pr|imarily |
|00001350| 69 6e 74 65 6e 64 65 64 | 20 66 6f 72 20 6b 65 65 |intended| for kee|
|00001360| 70 69 6e 67 20 74 72 61 | 63 6b 20 6f 66 20 73 6f |ping tra|ck of so|
|00001370| 66 74 77 61 72 65 20 72 | 65 63 69 76 65 64 20 76 |ftware r|ecived v|
|00001380| 69 61 0a 74 68 65 20 55 | 73 65 6e 65 74 20 6e 65 |ia.the U|senet ne|
|00001390| 77 73 20 6e 65 74 77 6f | 72 6b 2e 0a 2e 73 70 0a |ws netwo|rk...sp.|
|000013a0| 57 69 74 68 20 6e 6f 20 | 6f 70 74 69 6f 6e 73 2c |With no |options,|
|000013b0| 20 5c 66 49 6e 6f 74 65 | 5c 66 52 20 61 70 70 65 | \fInote|\fR appe|
|000013c0| 6e 64 73 20 6c 69 6e 65 | 73 20 66 72 6f 6d 20 73 |nds line|s from s|
|000013d0| 74 61 6e 64 61 72 64 20 | 69 6e 70 75 74 0a 74 6f |tandard |input.to|
|000013e0| 20 61 20 66 69 6c 65 20 | 63 61 6c 6c 65 64 20 60 | a file |called `|
|000013f0| 60 4e 4f 54 45 53 27 27 | 20 69 6e 20 74 68 65 20 |`NOTES''| in the |
|00001400| 63 75 72 72 65 6e 74 20 | 64 69 72 65 63 74 6f 72 |current |director|
|00001410| 79 2e 20 0a 54 68 65 20 | 66 6f 72 6d 61 74 20 6f |y. .The |format o|
|00001420| 66 20 61 20 4e 4f 54 45 | 53 20 66 69 6c 65 20 69 |f a NOTE|S file i|
|00001430| 73 3a 0a 2e 73 70 0a 2e | 6e 66 0a 2e 69 6e 20 2b |s:..sp..|nf..in +|
|00001440| 30 2e 37 69 0a 2e 74 61 | 20 30 2e 38 69 0a 70 72 |0.7i..ta| 0.8i.pr|
|00001450| 6f 67 72 61 6d 3a 09 5b | 4d 6d 6d 20 64 64 20 79 |ogram:.[|Mmm dd y|
|00001460| 79 5d 20 63 6f 6d 6d 65 | 6e 74 73 20 2e 2e 2e 0a |y] comme|nts ....|
|00001470| 3c 5c 66 49 31 20 74 61 | 62 5c 66 52 3e 09 6d 6f |<\fI1 ta|b\fR>.mo|
|00001480| 72 65 20 63 6f 6d 6d 65 | 6e 74 73 0a 3c 5c 66 49 |re comme|nts.<\fI|
|00001490| 62 6c 61 6e 6b 20 6c 69 | 6e 65 5c 66 52 3e 0a 2e |blank li|ne\fR>..|
|000014a0| 73 70 0a 2e 66 69 0a 2e | 69 6e 20 2d 30 2e 37 69 |sp..fi..|in -0.7i|
|000014b0| 0a 2e 54 50 0a 5c 66 42 | 5c 2d 65 5c 66 52 09 65 |..TP.\fB|\-e\fR.e|
|000014c0| 64 69 74 20 74 68 65 20 | 4e 4f 54 45 53 20 66 69 |dit the |NOTES fi|
|000014d0| 6c 65 20 75 73 69 6e 67 | 20 24 56 49 53 55 41 4c |le using| $VISUAL|
|000014e0| 20 61 73 20 74 68 65 20 | 65 64 69 74 6f 72 2e 0a | as the |editor..|
|000014f0| 49 66 20 56 49 53 55 41 | 4c 20 69 73 20 6e 6f 74 |If VISUA|L is not|
|00001500| 20 73 65 74 2c 20 5c 66 | 49 6e 6f 74 65 5c 66 52 | set, \f|Inote\fR|
|00001510| 20 6c 6f 6f 6b 73 20 66 | 6f 72 20 24 45 44 49 54 | looks f|or $EDIT|
|00001520| 4f 52 2c 20 61 6e 64 20 | 69 66 20 74 68 61 74 20 |OR, and |if that |
|00001530| 69 73 0a 61 6c 73 6f 20 | 6e 6f 74 20 73 65 74 2c |is.also |not set,|
|00001540| 20 64 65 66 61 75 6c 74 | 73 20 74 6f 20 60 60 2f | default|s to ``/|
|00001550| 75 73 72 2f 62 69 6e 2f | 76 69 27 27 2e 0a 2e 54 |usr/bin/|vi''...T|
|00001560| 50 0a 5c 66 42 5c 2d 72 | 5c 66 52 09 73 68 6f 77 |P.\fB\-r|\fR.show|
|00001570| 20 61 6c 6c 20 6e 6f 74 | 65 73 20 6f 6e 20 74 68 | all not|es on th|
|00001580| 65 20 67 69 76 65 6e 20 | 70 72 6f 67 72 61 6d 28 |e given |program(|
|00001590| 73 29 2c 20 6f 72 20 74 | 68 65 20 65 6e 74 69 72 |s), or t|he entir|
|000015a0| 65 20 4e 4f 54 45 53 0a | 66 69 6c 65 20 28 75 6e |e NOTES.|file (un|
|000015b0| 73 6f 72 74 65 64 29 20 | 69 66 20 6e 6f 20 70 72 |sorted) |if no pr|
|000015c0| 6f 67 72 61 6d 20 69 73 | 20 67 69 76 65 6e 2c 20 |ogram is| given, |
|000015d0| 70 69 70 65 64 20 74 68 | 72 6f 75 67 68 20 24 50 |piped th|rough $P|
|000015e0| 41 47 45 52 20 28 75 6e | 6c 65 73 73 0a 50 41 47 |AGER (un|less.PAG|
|000015f0| 45 52 20 69 73 20 5c 66 | 49 63 61 74 5c 66 52 29 |ER is \f|Icat\fR)|
|00001600| 2e 0a 2e 54 50 0a 5c 66 | 42 5c 2d 73 5c 66 52 09 |...TP.\f|B\-s\fR.|
|00001610| 73 68 6f 77 20 74 68 65 | 20 65 6e 74 69 72 65 20 |show the| entire |
|00001620| 4e 4f 54 45 53 20 66 69 | 6c 65 2c 20 73 6f 72 74 |NOTES fi|le, sort|
|00001630| 65 64 20 73 6f 20 61 6c | 6c 20 6e 6f 74 65 73 20 |ed so al|l notes |
|00001640| 6f 6e 20 61 0a 67 69 76 | 65 6e 20 70 72 6f 67 72 |on a.giv|en progr|
|00001650| 61 6d 20 6f 63 63 75 72 | 20 74 6f 67 65 74 68 65 |am occur| togethe|
|00001660| 72 2c 20 70 69 70 65 64 | 20 74 68 72 6f 75 67 68 |r, piped| through|
|00001670| 20 24 50 41 47 45 52 2e | 0a 2e 53 48 20 45 4e 56 | $PAGER.|..SH ENV|
|00001680| 49 52 4f 4e 4d 45 4e 54 | 20 56 41 52 49 41 42 4c |IRONMENT| VARIABL|
|00001690| 45 53 0a 2e 74 61 20 31 | 2e 33 69 20 33 69 0a 2e |ES..ta 1|.3i 3i..|
|000016a0| 6e 66 0a 5c 66 42 4e 61 | 6d 65 09 44 65 66 61 75 |nf.\fBNa|me.Defau|
|000016b0| 6c 74 09 50 75 72 70 6f | 73 65 5c 66 52 0a 2e 73 |lt.Purpo|se\fR..s|
|000016c0| 70 0a 50 41 47 45 52 09 | 2f 75 73 72 2f 6c 6f 63 |p.PAGER.|/usr/loc|
|000016d0| 61 6c 2f 62 69 6e 2f 6d | 6f 72 65 09 55 73 65 64 |al/bin/m|ore.Used|
|000016e0| 20 74 6f 20 70 61 67 65 | 20 6f 75 74 70 75 74 0a | to page| output.|
|000016f0| 56 49 53 55 41 4c 09 2f | 75 73 72 2f 62 69 6e 2f |VISUAL./|usr/bin/|
|00001700| 76 69 09 55 73 65 64 20 | 74 6f 20 65 64 69 74 20 |vi.Used |to edit |
|00001710| 74 68 65 20 4e 4f 54 45 | 53 20 66 69 6c 65 0a 45 |the NOTE|S file.E|
|00001720| 44 49 54 4f 52 09 6e 6f | 6e 65 09 55 73 65 64 20 |DITOR.no|ne.Used |
|00001730| 69 66 20 56 49 53 55 41 | 4c 20 69 73 20 6e 6f 74 |if VISUA|L is not|
|00001740| 20 73 65 74 0a 2e 66 69 | 0a 2e 53 48 20 46 49 4c | set..fi|..SH FIL|
|00001750| 45 53 0a 2e 74 61 20 31 | 2e 33 69 0a 2e 2f 4e 4f |ES..ta 1|.3i../NO|
|00001760| 54 45 53 09 66 69 6c 65 | 20 77 68 65 72 65 20 6e |TES.file| where n|
|00001770| 6f 74 65 73 20 61 72 65 | 20 6b 65 70 74 0a 2e 62 |otes are| kept..b|
|00001780| 72 0a 2f 74 6d 70 2f 6e | 6f 74 65 24 24 09 74 65 |r./tmp/n|ote$$.te|
|00001790| 6d 70 6f 72 61 72 79 20 | 66 69 6c 65 73 0a 2e 53 |mporary |files..S|
|000017a0| 48 20 53 45 45 20 41 4c | 53 4f 0a 5c 66 49 73 61 |H SEE AL|SO.\fIsa|
|000017b0| 76 65 73 72 63 28 31 4c | 29 5c 66 52 0a 2e 53 48 |vesrc(1L|)\fR..SH|
|000017c0| 20 41 55 54 48 4f 52 0a | 57 72 69 74 74 65 6e 20 | AUTHOR.|Written |
|000017d0| 62 79 20 43 68 72 69 73 | 74 69 6e 65 20 52 6f 62 |by Chris|tine Rob|
|000017e0| 65 72 74 73 6f 6e 20 31 | 39 38 36 0a 2e 53 48 20 |ertson 1|986..SH |
|000017f0| 42 55 47 53 0a 50 6c 65 | 61 73 65 20 73 65 6e 64 |BUGS.Ple|ase send|
|00001800| 20 61 6c 6c 20 62 75 67 | 20 72 65 70 6f 72 74 73 | all bug| reports|
|00001810| 20 74 6f 20 7b 6c 69 6e | 75 73 2c 20 69 68 6e 70 | to {lin|us, ihnp|
|00001820| 34 2c 20 64 65 63 76 61 | 78 7d 21 75 74 7a 6f 6f |4, decva|x}!utzoo|
|00001830| 21 74 6f 72 61 6d 21 63 | 68 72 69 73 2e 0a 53 48 |!toram!c|hris..SH|
|00001840| 41 52 5f 45 4f 46 0a 69 | 66 20 74 65 73 74 20 31 |AR_EOF.i|f test 1|
|00001850| 36 32 33 20 2d 6e 65 20 | 22 60 77 63 20 2d 63 20 |623 -ne |"`wc -c |
|00001860| 3c 20 27 6e 6f 74 65 2e | 31 27 60 22 0a 74 68 65 |< 'note.|1'`".the|
|00001870| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 65 72 |n..echo |shar: er|
|00001880| 72 6f 72 20 74 72 61 6e | 73 6d 69 74 74 69 6e 67 |ror tran|smitting|
|00001890| 20 22 27 6e 6f 74 65 2e | 31 27 22 20 27 28 73 68 | "'note.|1'" '(sh|
|000018a0| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 31 |ould hav|e been 1|
|000018b0| 36 32 33 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |623 char|acters)'|
|000018c0| 0a 66 69 0a 66 69 0a 65 | 63 68 6f 20 73 68 61 72 |.fi.fi.e|cho shar|
|000018d0| 3a 20 65 78 74 72 61 63 | 74 69 6e 67 20 22 27 73 |: extrac|ting "'s|
|000018e0| 61 76 65 73 72 63 27 22 | 20 27 28 31 34 32 36 38 |avesrc'"| '(14268|
|000018f0| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|00001900| 20 74 65 73 74 20 2d 66 | 20 27 73 61 76 65 73 72 | test -f| 'savesr|
|00001910| 63 27 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |c'.then.|.echo sh|
|00001920| 61 72 3a 20 77 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |ar: will| not ove|
|00001930| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00001940| 20 66 69 6c 65 20 22 27 | 73 61 76 65 73 72 63 27 | file "'|savesrc'|
|00001950| 22 0a 65 6c 73 65 0a 63 | 61 74 20 3c 3c 20 5c 53 |".else.c|at << \S|
|00001960| 48 41 52 5f 45 4f 46 20 | 3e 20 27 73 61 76 65 73 |HAR_EOF |> 'saves|
|00001970| 72 63 27 0a 23 21 2f 62 | 69 6e 2f 73 68 0a 0a 23 |rc'.#!/b|in/sh..#|
|00001980| 0a 23 09 53 61 76 65 73 | 72 63 3a 09 55 6e 70 61 |.#.Saves|rc:.Unpa|
|00001990| 63 6b 20 70 72 6f 67 72 | 61 6d 20 73 6f 75 72 63 |ck progr|am sourc|
|000019a0| 65 73 20 66 72 6f 6d 20 | 6e 65 77 73 20 69 6e 20 |es from |news in |
|000019b0| 61 20 73 65 6e 73 69 62 | 6c 65 20 6d 61 6e 6e 65 |a sensib|le manne|
|000019c0| 72 2e 0a 23 0a 23 09 09 | 09 09 43 6f 70 79 72 69 |r..#.#..|..Copyri|
|000019d0| 67 68 74 20 28 63 29 20 | 43 68 72 69 73 20 52 6f |ght (c) |Chris Ro|
|000019e0| 62 65 72 74 73 6f 6e 20 | 31 39 38 36 0a 23 0a 23 |bertson |1986.#.#|
|000019f0| 09 53 61 76 65 73 72 63 | 20 77 69 6c 6c 20 70 75 |.Savesrc| will pu|
|00001a00| 74 20 61 20 43 20 73 6f | 75 72 63 65 20 66 69 6c |t a C so|urce fil|
|00001a10| 65 20 69 6e 74 6f 20 61 | 20 64 65 66 61 75 6c 74 |e into a| default|
|00001a20| 20 73 6f 75 72 63 65 73 | 0a 23 09 64 69 72 65 63 | sources|.#.direc|
|00001a30| 74 6f 72 79 2c 20 6f 72 | 20 6d 61 6b 65 20 61 20 |tory, or| make a |
|00001a40| 6e 65 77 20 64 69 72 65 | 63 74 6f 72 79 20 28 73 |new dire|ctory (s|
|00001a50| 75 62 64 69 72 65 63 74 | 6f 72 79 20 62 79 20 64 |ubdirect|ory by d|
|00001a60| 65 66 61 75 6c 74 29 20 | 66 6f 72 0a 23 09 61 20 |efault) |for.#.a |
|00001a70| 73 68 61 72 2d 65 64 20 | 73 6f 75 72 63 65 20 61 |shar-ed |source a|
|00001a80| 6e 64 20 75 6e 70 61 63 | 6b 20 69 74 2e 20 20 49 |nd unpac|k it. I|
|00001a90| 74 20 77 69 6c 6c 20 6d | 61 6b 65 20 61 6e 20 65 |t will m|ake an e|
|00001aa0| 6e 74 72 79 0a 23 09 69 | 6e 20 61 20 4d 61 6b 65 |ntry.#.i|n a Make|
|00001ab0| 66 69 6c 65 20 28 6f 72 | 20 61 20 77 68 6f 6c 65 |file (or| a whole|
|00001ac0| 20 62 61 73 69 63 20 4d | 61 6b 65 66 69 6c 65 2c | basic M|akefile,|
|00001ad0| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 29 2c 0a | if nece|ssary),.|
|00001ae0| 23 09 74 61 6b 65 20 61 | 20 73 68 6f 74 20 61 74 |#.take a| shot at|
|00001af0| 20 63 6f 6d 70 69 6c 69 | 6e 67 20 74 68 65 20 74 | compili|ng the t|
|00001b00| 68 69 6e 67 20 69 66 20 | 79 6f 75 20 77 61 6e 74 |hing if |you want|
|00001b10| 20 69 74 20 74 6f 2c 20 | 67 69 76 65 0a 23 09 79 | it to, |give.#.y|
|00001b20| 6f 75 20 61 20 73 68 65 | 6c 6c 20 74 6f 20 64 69 |ou a she|ll to di|
|00001b30| 64 64 6c 65 20 74 68 65 | 20 73 6f 75 72 63 65 20 |ddle the| source |
|00001b40| 77 68 65 6e 20 69 74 20 | 77 6f 6e 27 74 20 63 6f |when it |won't co|
|00001b50| 6d 70 69 6c 65 2c 20 70 | 72 6f 6d 70 74 0a 23 09 |mpile, p|rompt.#.|
|00001b60| 79 6f 75 20 66 6f 72 20 | 61 20 73 68 6f 72 74 20 |you for |a short |
|00001b70| 62 6c 75 72 62 20 61 62 | 6f 75 74 20 77 68 61 74 |blurb ab|out what|
|00001b80| 20 69 74 20 64 6f 65 73 | 2c 20 61 6e 64 20 63 72 | it does|, and cr|
|00001b90| 65 61 74 65 20 61 20 6e | 6f 74 65 0a 23 09 61 73 |eate a n|ote.#.as|
|00001ba0| 20 74 6f 20 77 68 65 72 | 65 20 69 74 20 63 61 6d | to wher|e it cam|
|00001bb0| 65 20 66 72 6f 6d 20 61 | 6e 64 20 77 68 65 6e 2c |e from a|nd when,|
|00001bc0| 20 61 6e 64 20 77 68 65 | 74 68 65 72 20 69 74 20 | and whe|ther it |
|00001bd0| 63 6f 6d 70 69 6c 65 73 | 0a 23 09 61 6e 64 20 77 |compiles|.#.and w|
|00001be0| 6f 72 6b 73 2c 20 73 6f | 20 79 6f 75 20 68 61 76 |orks, so| you hav|
|00001bf0| 65 20 73 6f 6d 65 20 63 | 68 61 6e 63 65 20 6f 66 |e some c|hance of|
|00001c00| 20 72 65 6d 65 6d 62 65 | 72 69 6e 67 20 77 68 61 | remembe|ring wha|
|00001c10| 74 20 73 74 61 74 65 20 | 74 68 69 73 0a 23 09 73 |t state |this.#.s|
|00001c20| 74 75 66 66 20 69 73 20 | 69 6e 20 6e 65 78 74 20 |tuff is |in next |
|00001c30| 74 69 6d 65 20 79 6f 75 | 20 6c 6f 6f 6b 20 61 74 |time you| look at|
|00001c40| 20 69 74 2e 20 20 41 20 | 73 69 6d 70 6c 65 20 61 | it. A |simple a|
|00001c50| 75 78 69 6c 6c 69 61 72 | 79 20 70 72 6f 67 72 61 |uxilliar|y progra|
|00001c60| 6d 2c 0a 23 09 6e 6f 74 | 65 2c 20 67 6f 65 73 20 |m,.#.not|e, goes |
|00001c70| 77 69 74 68 20 74 68 69 | 73 20 61 6e 64 20 69 73 |with thi|s and is|
|00001c80| 20 75 73 65 64 20 66 6f | 72 20 61 64 64 69 6e 67 | used fo|r adding|
|00001c90| 2f 72 65 61 64 69 6e 67 | 20 6e 6f 74 65 73 20 6f |/reading| notes o|
|00001ca0| 6e 0a 23 09 73 6f 75 72 | 63 65 73 2e 20 20 50 72 |n.#.sour|ces. Pr|
|00001cb0| 6f 6d 70 74 73 20 61 72 | 65 20 64 65 6c 69 62 65 |ompts ar|e delibe|
|00001cc0| 72 61 74 65 6c 79 20 72 | 61 74 68 65 72 20 74 65 |rately r|ather te|
|00001cd0| 72 73 65 20 66 6f 72 20 | 74 68 6f 73 65 20 66 6f |rse for |those fo|
|00001ce0| 6c 6b 73 20 77 68 6f 0a | 23 09 72 65 61 64 20 6e |lks who.|#.read n|
|00001cf0| 65 77 73 20 61 74 20 73 | 6c 6f 77 20 62 61 75 64 |ews at s|low baud|
|00001d00| 20 72 61 74 65 73 2e 0a | 23 0a 23 09 55 73 61 67 | rates..|#.#.Usag|
|00001d10| 65 3a 09 66 72 6f 6d 20 | 72 6e 2c 20 7c 20 73 61 |e:.from |rn, | sa|
|00001d20| 76 65 73 72 63 20 64 65 | 73 74 0a 23 09 09 09 6f |vesrc de|st.#...o|
|00001d30| 74 68 65 72 77 69 73 65 | 2c 20 73 61 76 65 73 72 |therwise|, savesr|
|00001d40| 63 20 64 65 73 74 20 5b | 73 6f 75 72 63 65 66 69 |c dest [|sourcefi|
|00001d50| 6c 65 20 2e 2e 2e 20 5d | 0a 23 0a 23 09 53 61 76 |le ... ]|.#.#.Sav|
|00001d60| 65 73 72 63 20 65 78 70 | 65 63 74 73 20 61 74 20 |esrc exp|ects at |
|00001d70| 6c 65 61 73 74 20 6f 6e | 65 20 61 72 67 75 6d 65 |least on|e argume|
|00001d80| 6e 74 2c 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 |nt, the |name of |
|00001d90| 61 20 43 20 73 6f 75 72 | 63 65 20 66 69 6c 65 0a |a C sour|ce file.|
|00001da0| 23 09 28 69 6e 20 22 66 | 6f 6f 2e 63 22 20 66 6f |#.(in "f|oo.c" fo|
|00001db0| 72 6d 29 2c 20 6f 72 20 | 74 68 65 20 6e 61 6d 65 |rm), or |the name|
|00001dc0| 20 6f 66 20 61 20 64 69 | 72 65 63 74 6f 72 79 20 | of a di|rectory |
|00001dd0| 74 6f 20 70 75 74 20 61 | 20 62 75 6e 63 68 0a 23 |to put a| bunch.#|
|00001de0| 09 6f 66 20 73 74 75 66 | 66 20 69 6e 2c 20 61 6e |.of stuf|f in, an|
|00001df0| 64 20 6d 61 79 20 68 61 | 76 65 20 73 65 76 65 72 |d may ha|ve sever|
|00001e00| 61 6c 20 6f 74 68 65 72 | 20 61 72 67 75 6d 65 6e |al other| argumen|
|00001e10| 74 73 20 77 68 69 63 68 | 20 61 72 65 0a 23 09 75 |ts which| are.#.u|
|00001e20| 73 65 64 20 61 73 20 74 | 68 65 20 70 72 6f 67 72 |sed as t|he progr|
|00001e30| 61 6d 20 73 6f 75 72 63 | 65 20 69 6e 70 75 74 20 |am sourc|e input |
|00001e40| 66 69 6c 65 73 2e 20 20 | 49 74 20 69 73 20 6e 6f |files. |It is no|
|00001e50| 72 6d 61 6c 6c 79 20 6e | 6f 74 0a 23 09 76 65 72 |rmally n|ot.#.ver|
|00001e60| 79 20 73 65 6e 73 69 62 | 6c 65 20 74 6f 20 67 69 |y sensib|le to gi|
|00001e70| 76 65 20 69 74 20 6d 6f | 72 65 20 74 68 61 6e 20 |ve it mo|re than |
|00001e80| 6f 6e 65 20 73 6f 75 72 | 63 65 20 66 69 6c 65 2c |one sour|ce file,|
|00001e90| 20 68 6f 77 65 76 65 72 | 2e 0a 23 0a 23 09 55 73 | however|..#.#.Us|
|00001ea0| 65 20 51 55 49 54 20 74 | 6f 20 61 62 6f 72 74 20 |e QUIT t|o abort |
|00001eb0| 69 74 2c 20 6e 6f 74 20 | 44 45 4c 2e 0a 23 0a 23 |it, not |DEL..#.#|
|00001ec0| 09 41 73 73 75 6d 70 74 | 69 6f 6e 73 3a 0a 23 09 |.Assumpt|ions:.#.|
|00001ed0| 09 2f 62 69 6e 2f 5b 20 | 65 78 69 73 74 73 20 2d |./bin/[ |exists -|
|00001ee0| 2d 20 72 65 70 6c 61 63 | 65 20 77 69 74 68 20 22 |- replac|e with "|
|00001ef0| 74 65 73 74 22 20 69 66 | 20 6e 65 63 65 73 73 61 |test" if| necessa|
|00001f00| 72 79 0a 23 09 09 75 6e | 73 68 61 72 20 65 78 69 |ry.#..un|shar exi|
|00001f10| 73 74 73 20 2d 2d 20 72 | 65 70 6c 61 63 65 20 77 |sts -- r|eplace w|
|00001f20| 69 74 68 20 22 73 68 22 | 20 69 66 20 6e 65 63 65 |ith "sh"| if nece|
|00001f30| 73 73 61 72 79 0a 23 09 | 09 6e 6f 74 65 20 65 78 |ssary.#.|.note ex|
|00001f40| 69 73 74 73 20 20 20 2d | 2d 20 72 65 70 6c 61 63 |ists -|- replac|
|00001f50| 65 20 77 69 74 68 20 22 | 63 61 74 20 3e 3e 20 4e |e with "|cat >> N|
|00001f60| 4f 54 45 53 22 20 69 66 | 20 6e 65 63 65 73 73 61 |OTES" if| necessa|
|00001f70| 72 79 0a 23 0a 23 09 45 | 64 69 74 69 6e 67 20 4e |ry.#.#.E|diting N|
|00001f80| 6f 74 65 3a 0a 23 09 09 | 54 68 69 73 20 69 73 20 |ote:.#..|This is |
|00001f90| 73 65 74 20 75 70 20 66 | 6f 72 20 76 69 20 77 69 |set up f|or vi wi|
|00001fa0| 74 68 20 74 61 62 73 74 | 6f 70 3d 34 20 61 6e 64 |th tabst|op=4 and|
|00001fb0| 20 73 68 69 66 74 77 69 | 64 74 68 3d 34 2e 0a 23 | shiftwi|dth=4..#|
|00001fc0| 09 09 49 6e 64 65 6e 74 | 69 6e 67 20 77 69 6c 6c |..Indent|ing will|
|00001fd0| 20 6c 6f 6f 6b 20 66 75 | 6e 6e 79 20 6f 74 68 65 | look fu|nny othe|
|00001fe0| 72 77 69 73 65 2e 0a 23 | 0a 0a 74 72 61 70 20 27 |rwise..#|..trap '|
|00001ff0| 27 20 32 0a 74 72 61 70 | 20 22 72 6d 20 2d 66 20 |' 2.trap| "rm -f |
|00002000| 2f 74 6d 70 2f 6e 65 77 | 73 72 63 24 24 3b 65 78 |/tmp/new|src$$;ex|
|00002010| 69 74 22 20 30 20 31 20 | 33 0a 0a 63 61 73 65 20 |it" 0 1 |3..case |
|00002020| 22 24 56 49 53 55 41 4c | 22 20 69 6e 0a 09 22 22 |"$VISUAL|" in..""|
|00002030| 29 0a 09 09 63 61 73 65 | 20 22 24 45 44 49 54 4f |)...case| "$EDITO|
|00002040| 52 22 20 69 6e 0a 09 09 | 09 22 22 29 0a 09 09 09 |R" in...|."")....|
|00002050| 09 3b 3b 0a 09 09 09 2a | 29 0a 09 09 09 09 56 49 |.;;....*|).....VI|
|00002060| 53 55 41 4c 3d 24 45 44 | 49 54 4f 52 0a 09 09 09 |SUAL=$ED|ITOR....|
|00002070| 09 3b 3b 0a 09 09 65 73 | 61 63 0a 09 09 3b 3b 0a |.;;...es|ac...;;.|
|00002080| 65 73 61 63 0a 56 49 53 | 55 41 4c 3d 24 7b 56 49 |esac.VIS|UAL=${VI|
|00002090| 53 55 41 4c 2d 2f 75 73 | 72 2f 62 69 6e 2f 76 69 |SUAL-/us|r/bin/vi|
|000020a0| 7d 0a 63 61 73 65 20 22 | 24 56 49 53 55 41 4c 22 |}.case "|$VISUAL"|
|000020b0| 20 69 6e 0a 09 22 22 29 | 09 09 09 09 09 09 23 20 | in.."")|......# |
|000020c0| 69 6e 20 63 61 73 65 20 | 69 74 27 73 20 65 78 70 |in case |it's exp|
|000020d0| 6c 69 63 69 74 6c 79 20 | 73 65 74 20 74 6f 20 6e |licitly |set to n|
|000020e0| 6f 74 68 69 6e 67 0a 09 | 09 56 49 53 55 41 4c 3d |othing..|.VISUAL=|
|000020f0| 2f 62 69 6e 2f 65 64 0a | 09 09 3b 3b 0a 65 73 61 |/bin/ed.|..;;.esa|
|00002100| 63 0a 53 48 45 4c 4c 3d | 24 7b 53 48 45 4c 4c 2d |c.SHELL=|${SHELL-|
|00002110| 2f 62 69 6e 2f 73 68 7d | 0a 50 41 47 45 52 3d 24 |/bin/sh}|.PAGER=$|
|00002120| 7b 50 41 47 45 52 2d 2f | 75 73 72 2f 6c 6f 63 61 |{PAGER-/|usr/loca|
|00002130| 6c 2f 62 69 6e 2f 6d 6f | 72 65 7d 0a 63 61 73 65 |l/bin/mo|re}.case|
|00002140| 20 22 24 50 41 47 45 52 | 22 20 69 6e 0a 09 22 22 | "$PAGER|" in..""|
|00002150| 29 09 09 09 09 09 09 23 | 20 69 6e 20 63 61 73 65 |)......#| in case|
|00002160| 20 69 74 27 73 20 65 78 | 70 6c 69 63 69 74 6c 79 | it's ex|plicitly|
|00002170| 20 73 65 74 20 74 6f 20 | 6e 6f 74 68 69 6e 67 0a | set to |nothing.|
|00002180| 09 09 50 41 47 45 52 3d | 63 61 74 0a 09 09 3b 3b |..PAGER=|cat...;;|
|00002190| 0a 65 73 61 63 0a 0a 73 | 72 63 64 69 72 3d 24 7b |.esac..s|rcdir=${|
|000021a0| 73 72 63 64 69 72 2d 24 | 48 4f 4d 45 2f 73 72 63 |srcdir-$|HOME/src|
|000021b0| 7d 09 09 09 09 23 20 77 | 68 65 72 65 20 73 6f 75 |}....# w|here sou|
|000021c0| 72 63 65 20 69 73 20 6b | 65 70 74 20 2d 2d 20 6f |rce is k|ept -- o|
|000021d0| 76 65 72 69 64 64 65 6e | 20 62 79 0a 09 09 09 09 |veridden| by.....|
|000021e0| 09 09 09 09 09 09 23 09 | 61 20 66 75 6c 6c 20 70 |......#.|a full p|
|000021f0| 61 74 68 6e 61 6d 65 20 | 66 6f 72 20 64 65 73 74 |athname |for dest|
|00002200| 0a 6d 61 6e 64 69 72 3d | 24 7b 6d 61 6e 64 69 72 |.mandir=|${mandir|
|00002210| 2d 24 48 4f 4d 45 2f 6d | 61 6e 7d 09 09 09 09 23 |-$HOME/m|an}....#|
|00002220| 20 77 68 65 72 65 20 73 | 72 63 20 6d 61 6e 75 61 | where s|rc manua|
|00002230| 6c 20 70 61 67 65 73 20 | 67 6f 0a 63 61 74 64 69 |l pages |go.catdi|
|00002240| 72 3d 24 7b 63 61 74 64 | 69 72 2d 24 48 4f 4d 45 |r=${catd|ir-$HOME|
|00002250| 2f 6d 61 6e 7d 09 09 09 | 09 23 20 77 68 65 72 65 |/man}...|.# where|
|00002260| 20 66 6f 72 6d 61 74 74 | 65 64 20 6d 61 6e 75 61 | formatt|ed manua|
|00002270| 6c 20 70 61 67 65 73 20 | 67 6f 0a 43 46 4c 41 47 |l pages |go.CFLAG|
|00002280| 53 3d 24 7b 43 46 4c 41 | 47 53 2d 2d 4f 7d 09 09 |S=${CFLA|GS--O}..|
|00002290| 09 09 09 09 23 20 75 73 | 65 64 20 69 6e 20 67 65 |....# us|ed in ge|
|000022a0| 6e 65 72 61 74 69 6e 67 | 20 61 20 4d 61 6b 65 66 |nerating| a Makef|
|000022b0| 69 6c 65 0a 0a 6c 73 3d | 22 6c 73 20 2d 46 22 09 |ile..ls=|"ls -F".|
|000022c0| 09 09 09 09 09 09 09 23 | 20 72 65 70 6c 61 63 65 |.......#| replace|
|000022d0| 20 77 69 74 68 20 79 6f | 75 72 20 66 61 76 6f 75 | with yo|ur favou|
|000022e0| 72 69 74 65 0a 0a 23 20 | 66 69 6e 64 20 77 68 69 |rite..# |find whi|
|000022f0| 63 68 20 65 63 68 6f 20 | 77 65 27 72 65 20 75 73 |ch echo |we're us|
|00002300| 69 6e 67 2c 20 74 68 61 | 6e 6b 73 20 74 6f 20 4c |ing, tha|nks to L|
|00002310| 61 72 72 79 20 57 61 6c | 6c 20 66 6f 72 20 74 68 |arry Wal|l for th|
|00002320| 65 20 69 64 65 61 0a 0a | 63 61 73 65 20 22 60 65 |e idea..|case "`e|
|00002330| 63 68 6f 20 2d 6e 20 66 | 6f 6f 60 22 20 69 6e 0a |cho -n f|oo`" in.|
|00002340| 09 2d 6e 2a 29 0a 09 09 | 63 3d 22 5c 63 22 0a 09 |.-n*)...|c="\c"..|
|00002350| 09 6e 3d 22 22 0a 09 09 | 3b 3b 0a 09 66 6f 6f 29 |.n=""...|;;..foo)|
|00002360| 0a 09 09 63 3d 22 22 0a | 09 09 6e 3d 22 2d 6e 22 |...c="".|..n="-n"|
|00002370| 0a 09 09 3b 3b 0a 09 2a | 29 0a 09 09 65 63 68 6f |...;;..*|)...echo|
|00002380| 20 22 59 6f 75 72 20 65 | 63 68 6f 20 63 6f 6d 6d | "Your e|cho comm|
|00002390| 61 6e 64 20 69 73 20 62 | 72 6f 6b 65 6e 21 22 0a |and is b|roken!".|
|000023a0| 09 09 63 3d 0a 09 09 6e | 3d 0a 09 09 3b 3b 0a 65 |..c=...n|=...;;.e|
|000023b0| 73 61 63 0a 0a 23 20 66 | 69 6e 64 20 77 68 61 74 |sac..# f|ind what|
|000023c0| 20 77 65 20 77 61 6e 74 | 20 74 6f 20 63 61 6c 6c | we want| to call|
|000023d0| 20 69 74 20 61 6e 64 20 | 73 61 76 65 20 74 68 65 | it and |save the|
|000023e0| 20 61 72 74 69 63 6c 65 | 20 28 72 65 61 64 20 73 | article| (read s|
|000023f0| 74 61 6e 64 61 72 64 20 | 69 6e 70 75 74 0a 23 20 |tandard |input.# |
|00002400| 69 66 20 6e 6f 20 66 69 | 6c 65 6e 61 6d 65 20 67 |if no fi|lename g|
|00002410| 69 76 65 6e 29 0a 0a 63 | 61 73 65 20 22 24 23 22 |iven)..c|ase "$#"|
|00002420| 20 69 6e 0a 09 30 29 0a | 09 09 65 63 68 6f 20 22 | in..0).|..echo "|
|00002430| 55 73 61 67 65 3a 20 73 | 61 76 65 73 72 63 20 64 |Usage: s|avesrc d|
|00002440| 65 73 74 20 5b 73 6f 75 | 72 63 65 66 69 6c 65 20 |est [sou|rcefile |
|00002450| 2e 2e 2e 5d 22 20 3e 20 | 2f 64 65 76 2f 74 74 79 |...]" > |/dev/tty|
|00002460| 0a 09 09 65 78 69 74 20 | 31 0a 09 09 3b 3b 0a 65 |...exit |1...;;.e|
|00002470| 73 61 63 0a 64 65 73 74 | 3d 24 31 0a 73 68 69 66 |sac.dest|=$1.shif|
|00002480| 74 0a 63 61 74 20 24 2a | 20 3e 20 2f 74 6d 70 2f |t.cat $*| > /tmp/|
|00002490| 6e 65 77 73 72 63 24 24 | 0a 0a 23 20 69 66 20 77 |newsrc$$|..# if w|
|000024a0| 68 61 74 20 77 65 27 76 | 65 20 73 61 76 65 64 20 |hat we'v|e saved |
|000024b0| 77 61 73 20 61 20 6e 65 | 77 73 20 61 72 74 69 63 |was a ne|ws artic|
|000024c0| 6c 65 2c 20 73 74 72 69 | 70 20 6f 66 66 20 74 68 |le, stri|p off th|
|000024d0| 65 20 68 65 61 64 65 72 | 2c 20 62 75 74 0a 23 20 |e header|, but.# |
|000024e0| 72 65 6d 65 6d 62 65 72 | 20 74 68 65 20 64 61 74 |remember| the dat|
|000024f0| 65 2c 20 70 61 74 68 2c | 20 61 6e 64 20 70 6f 73 |e, path,| and pos|
|00002500| 74 65 72 2e 20 20 49 66 | 20 79 6f 75 20 68 61 76 |ter. If| you hav|
|00002510| 65 20 27 62 6d 27 2c 20 | 79 6f 75 20 6d 61 79 20 |e 'bm', |you may |
|00002520| 77 61 6e 74 0a 23 20 74 | 6f 20 72 65 70 6c 61 63 |want.# t|o replac|
|00002530| 65 20 27 67 72 65 70 27 | 20 77 69 74 68 20 69 74 |e 'grep'| with it|
|00002540| 20 66 6f 72 20 73 70 65 | 65 64 2e 0a 0a 64 61 74 | for spe|ed...dat|
|00002550| 65 3d 22 60 73 65 74 20 | 2d 20 5c 60 64 61 74 65 |e="`set |- \`date|
|00002560| 5c 60 3b 65 63 68 6f 20 | 24 32 20 24 33 20 24 36 |\`;echo |$2 $3 $6|
|00002570| 60 22 0a 63 61 73 65 20 | 22 60 65 67 72 65 70 20 |`".case |"`egrep |
|00002580| 27 50 6f 73 74 69 6e 67 | 2d 56 65 72 73 69 6f 6e |'Posting|-Version|
|00002590| 7c 52 65 6c 61 79 2d 56 | 65 72 73 69 6f 6e 3a 7c ||Relay-V|ersion:||
|000025a0| 5e 46 72 6f 6d 3a 27 20 | 2f 74 6d 70 2f 6e 65 77 |^From:' |/tmp/new|
|000025b0| 73 72 63 24 24 60 22 20 | 69 6e 0a 09 22 22 29 0a |src$$`" |in.."").|
|000025c0| 09 09 23 20 6e 6f 74 20 | 61 20 6e 65 77 73 20 61 |..# not |a news a|
|000025d0| 72 74 69 63 6c 65 0a 0a | 09 09 70 61 74 68 3d 0a |rticle..|..path=.|
|000025e0| 09 09 70 6f 73 74 65 72 | 3d 0a 09 09 3b 3b 0a 09 |..poster|=...;;..|
|000025f0| 2a 29 0a 09 09 70 61 74 | 68 3d 22 60 67 72 65 70 |*)...pat|h="`grep|
|00002600| 20 27 5e 50 61 74 68 3a | 27 20 2f 74 6d 70 2f 6e | '^Path:|' /tmp/n|
|00002610| 65 77 73 72 63 24 24 60 | 22 0a 09 09 70 6f 73 74 |ewsrc$$`|"...post|
|00002620| 65 72 3d 22 60 67 72 65 | 70 20 27 5e 46 72 6f 6d |er="`gre|p '^From|
|00002630| 3a 27 20 2f 74 6d 70 2f | 6e 65 77 73 72 63 24 24 |:' /tmp/|newsrc$$|
|00002640| 60 22 0a 09 09 73 65 64 | 20 2d 65 20 27 31 2c 2f |`"...sed| -e '1,/|
|00002650| 5e 24 2f 64 27 20 2f 74 | 6d 70 2f 6e 65 77 73 72 |^$/d' /t|mp/newsr|
|00002660| 63 24 24 20 3e 20 2f 74 | 6d 70 2f 73 74 72 69 70 |c$$ > /t|mp/strip|
|00002670| 24 24 0a 09 09 6d 76 20 | 2f 74 6d 70 2f 73 74 72 |$$...mv |/tmp/str|
|00002680| 69 70 24 24 20 2f 74 6d | 70 2f 6e 65 77 73 72 63 |ip$$ /tm|p/newsrc|
|00002690| 24 24 0a 09 09 3b 3b 0a | 65 73 61 63 0a 0a 23 20 |$$...;;.|esac..# |
|000026a0| 73 65 74 20 75 70 20 73 | 74 61 6e 64 61 72 64 20 |set up s|tandard |
|000026b0| 69 6e 70 75 74 20 61 6e | 64 20 6f 75 74 70 75 74 |input an|d output|
|000026c0| 20 74 6f 20 62 65 20 2f | 64 65 76 2f 74 74 79 2c | to be /|dev/tty,|
|000026d0| 20 69 6e 20 63 61 73 65 | 20 74 68 69 73 20 69 73 | in case| this is|
|000026e0| 20 69 6e 76 6f 6b 65 64 | 0a 23 20 76 69 61 20 61 | invoked|.# via a|
|000026f0| 20 70 69 70 65 20 66 72 | 6f 6d 20 72 6e 0a 0a 65 | pipe fr|om rn..e|
|00002700| 78 65 63 20 3c 20 2f 64 | 65 76 2f 74 74 79 20 3e |xec < /d|ev/tty >|
|00002710| 20 2f 64 65 76 2f 74 74 | 79 0a 0a 23 20 73 65 65 | /dev/tt|y..# see|
|00002720| 20 69 66 20 77 65 20 67 | 6f 74 20 61 20 66 75 6c | if we g|ot a ful|
|00002730| 6c 20 70 61 74 68 6e 61 | 6d 65 20 61 73 20 27 64 |l pathna|me as 'd|
|00002740| 65 73 74 27 2c 20 6f 74 | 68 65 72 77 69 73 65 20 |est', ot|herwise |
|00002750| 63 64 20 74 6f 20 73 6f | 75 72 63 65 20 64 69 72 |cd to so|urce dir|
|00002760| 0a 0a 63 61 73 65 20 22 | 24 64 65 73 74 22 20 69 |..case "|$dest" i|
|00002770| 6e 0a 09 2f 2a 29 0a 09 | 09 3b 3b 0a 09 2a 29 0a |n../*)..|.;;..*).|
|00002780| 09 09 63 64 20 24 73 72 | 63 64 69 72 20 7c 7c 20 |..cd $sr|cdir || |
|00002790| 65 78 69 74 20 30 0a 09 | 09 3b 3b 0a 65 73 61 63 |exit 0..|.;;.esac|
|000027a0| 0a 0a 23 20 66 69 6c 65 | 20 6e 61 6d 65 73 20 6b |..# file| names k|
|000027b0| 6e 6f 77 6e 20 61 62 6f | 75 74 20 61 72 65 20 2a |nown abo|ut are *|
|000027c0| 2e 3f 2c 20 2a 2e 5b 31 | 2d 38 5d 2c 20 2a 2e 66 |.?, *.[1|-8], *.f|
|000027d0| 69 78 2c 20 2a 2e 62 75 | 67 2c 20 2a 2e 70 61 74 |ix, *.bu|g, *.pat|
|000027e0| 63 68 2c 20 26 20 52 45 | 41 44 2a 20 2d 2d 0a 23 |ch, & RE|AD* --.#|
|000027f0| 20 61 6e 79 74 68 69 6e | 67 20 65 6c 73 65 20 69 | anythin|g else i|
|00002800| 73 20 61 73 73 75 6d 65 | 64 20 74 6f 20 62 65 20 |s assume|d to be |
|00002810| 61 20 64 69 72 65 63 74 | 6f 72 79 20 6e 61 6d 65 |a direct|ory name|
|00002820| 20 0a 0a 63 61 73 65 20 | 22 24 64 65 73 74 22 20 | ..case |"$dest" |
|00002830| 69 6e 0a 09 2a 2e 5b 31 | 2d 38 5d 29 09 09 09 09 |in..*.[1|-8])....|
|00002840| 09 20 23 20 6d 61 6e 75 | 61 6c 20 70 61 67 65 73 |. # manu|al pages|
|00002850| 0a 09 09 75 6e 74 69 6c | 20 5b 20 21 20 2d 73 20 |...until| [ ! -s |
|00002860| 22 24 64 65 73 74 22 20 | 5d 0a 09 09 09 64 6f 0a |"$dest" |]....do.|
|00002870| 09 09 09 65 63 68 6f 20 | 24 6e 20 22 5c 6e 4f 76 |...echo |$n "\nOv|
|00002880| 65 72 77 72 69 74 65 20 | 27 24 64 65 73 74 27 3f |erwrite |'$dest'?|
|00002890| 20 5b 6e 5d 20 24 63 22 | 0a 09 09 09 72 65 61 64 | [n] $c"|....read|
|000028a0| 20 61 6e 73 77 65 72 0a | 09 09 09 63 61 73 65 20 | answer.|...case |
|000028b0| 22 24 61 6e 73 77 65 72 | 22 20 69 6e 0a 09 09 09 |"$answer|" in....|
|000028c0| 09 71 2a 7c 51 2a 29 0a | 09 09 09 09 09 65 78 69 |.q*|Q*).|.....exi|
|000028d0| 74 20 30 0a 09 09 09 09 | 09 3b 3b 0a 09 09 09 09 |t 0.....|.;;.....|
|000028e0| 79 2a 7c 59 2a 29 0a 09 | 09 09 09 09 62 72 65 61 |y*|Y*)..|....brea|
|000028f0| 6b 0a 09 09 09 09 09 3b | 3b 0a 09 09 09 09 2a 29 |k......;|;.....*)|
|00002900| 0a 09 09 09 09 09 65 63 | 68 6f 20 24 6e 20 22 4e |......ec|ho $n "N|
|00002910| 65 77 20 6e 61 6d 65 3a | 20 24 63 22 0a 09 09 09 |ew name:| $c"....|
|00002920| 09 09 72 65 61 64 20 64 | 65 73 74 0a 09 09 09 09 |..read d|est.....|
|00002930| 09 3b 3b 0a 09 09 09 65 | 73 61 63 0a 09 09 64 6f |.;;....e|sac...do|
|00002940| 6e 65 0a 09 09 6d 76 20 | 2f 74 6d 70 2f 6e 65 77 |ne...mv |/tmp/new|
|00002950| 73 72 63 24 24 20 24 64 | 65 73 74 0a 09 09 65 63 |src$$ $d|est...ec|
|00002960| 68 6f 20 24 6e 20 22 5c | 6e 45 64 69 74 20 24 7b |ho $n "\|nEdit ${|
|00002970| 64 65 73 74 7d 3f 20 5b | 79 5d 20 24 63 22 0a 09 |dest}? [|y] $c"..|
|00002980| 09 72 65 61 64 20 61 6e | 73 77 65 72 0a 09 09 63 |.read an|swer...c|
|00002990| 61 73 65 20 22 24 61 6e | 73 77 65 72 22 20 69 6e |ase "$an|swer" in|
|000029a0| 0a 09 09 09 71 2a 7c 51 | 2a 29 0a 09 09 09 09 65 |....q*|Q|*).....e|
|000029b0| 78 69 74 20 30 0a 09 09 | 09 09 3b 3b 0a 09 09 09 |xit 0...|..;;....|
|000029c0| 6e 2a 7c 4e 2a 29 0a 09 | 09 09 09 3b 3b 0a 09 09 |n*|N*)..|...;;...|
|000029d0| 09 2a 29 0a 09 09 09 09 | 74 72 61 70 20 27 27 20 |.*).....|trap '' |
|000029e0| 32 20 33 0a 09 09 09 09 | 28 24 56 49 53 55 41 4c |2 3.....|($VISUAL|
|000029f0| 20 24 64 65 73 74 29 0a | 09 09 09 09 74 72 61 70 | $dest).|....trap|
|00002a00| 20 33 0a 09 09 09 09 3b | 3b 0a 09 09 65 73 61 63 | 3.....;|;...esac|
|00002a10| 0a 09 09 73 65 63 74 69 | 6f 6e 3d 60 65 78 70 72 |...secti|on=`expr|
|00002a20| 20 22 24 64 65 73 74 22 | 20 3a 20 27 2e 2a 5c 2e | "$dest"| : '.*\.|
|00002a30| 5c 28 2e 2a 5c 29 27 60 | 0a 09 09 63 61 73 65 20 |\(.*\)'`|...case |
|00002a40| 22 60 66 69 6c 65 20 24 | 64 65 73 74 60 22 20 69 |"`file $|dest`" i|
|00002a50| 6e 0a 09 09 09 2a 72 6f | 66 66 2a 29 0a 09 09 09 |n....*ro|ff*)....|
|00002a60| 09 65 63 68 6f 20 24 6e | 20 22 5c 6e 24 64 65 73 |.echo $n| "\n$des|
|00002a70| 74 20 2d 2d 20 6d 61 6e | 20 70 61 67 65 20 73 6f |t -- man| page so|
|00002a80| 75 72 63 65 2e 20 4d 6f | 76 65 20 74 6f 20 24 6d |urce. Mo|ve to $m|
|00002a90| 61 6e 64 69 72 2f 6d 61 | 6e 24 7b 73 65 63 74 69 |andir/ma|n${secti|
|00002aa0| 6f 6e 7d 3f 20 5b 79 5d | 20 24 63 22 0a 09 09 09 |on}? [y]| $c"....|
|00002ab0| 09 72 65 61 64 20 61 6e | 73 77 65 72 0a 09 09 09 |.read an|swer....|
|00002ac0| 09 63 61 73 65 20 22 24 | 61 6e 73 77 65 72 22 20 |.case "$|answer" |
|00002ad0| 69 6e 0a 09 09 09 09 09 | 71 2a 7c 51 2a 29 0a 09 |in......|q*|Q*)..|
|00002ae0| 09 09 09 09 09 65 78 69 | 74 20 30 0a 09 09 09 09 |.....exi|t 0.....|
|00002af0| 09 09 3b 3b 0a 09 09 09 | 09 09 6e 2a 7c 4e 2a 29 |..;;....|..n*|N*)|
|00002b00| 0a 09 09 09 09 09 09 3b | 3b 0a 09 09 09 09 09 2a |.......;|;......*|
|00002b10| 29 0a 09 09 09 09 09 09 | 69 66 20 5b 20 21 20 2d |).......|if [ ! -|
|00002b20| 64 20 24 6d 61 6e 64 69 | 72 2f 6d 61 6e 24 73 65 |d $mandi|r/man$se|
|00002b30| 63 74 69 6f 6e 20 5d 0a | 09 09 09 09 09 09 09 74 |ction ].|.......t|
|00002b40| 68 65 6e 0a 09 09 09 09 | 09 09 09 69 66 20 28 6d |hen.....|...if (m|
|00002b50| 6b 64 69 72 20 24 6d 61 | 6e 64 69 72 2f 6d 61 6e |kdir $ma|ndir/man|
|00002b60| 24 73 65 63 74 69 6f 6e | 20 3e 20 2f 64 65 76 2f |$section| > /dev/|
|00002b70| 6e 75 6c 6c 20 32 3e 26 | 31 29 0a 09 09 09 09 09 |null 2>&|1)......|
|00002b80| 09 09 09 74 68 65 6e 0a | 09 09 09 09 09 09 09 09 |...then.|........|
|00002b90| 6d 76 20 24 64 65 73 74 | 20 24 6d 61 6e 64 69 72 |mv $dest| $mandir|
|00002ba0| 2f 6d 61 6e 24 73 65 63 | 74 69 6f 6e 0a 09 09 09 |/man$sec|tion....|
|00002bb0| 09 09 09 09 09 64 65 73 | 74 3d 24 6d 61 6e 64 69 |.....des|t=$mandi|
|00002bc0| 72 2f 6d 61 6e 24 73 65 | 63 74 69 6f 6e 2f 24 64 |r/man$se|ction/$d|
|00002bd0| 65 73 74 0a 09 09 09 09 | 09 09 09 65 6c 73 65 0a |est.....|...else.|
|00002be0| 09 09 09 09 09 09 09 09 | 65 63 68 6f 20 22 43 61 |........|echo "Ca|
|00002bf0| 6e 27 74 20 6d 61 6b 65 | 20 64 69 72 65 63 74 6f |n't make| directo|
|00002c00| 72 79 20 24 6d 61 6e 64 | 69 72 2f 6d 61 6e 24 73 |ry $mand|ir/man$s|
|00002c10| 65 63 74 69 6f 6e 20 2d | 2d 20 63 61 6e 27 74 20 |ection -|- can't |
|00002c20| 6d 6f 76 65 20 24 64 65 | 73 74 2e 22 0a 09 09 09 |move $de|st."....|
|00002c30| 09 09 09 09 66 69 0a 09 | 09 09 09 09 09 65 6c 73 |....fi..|.....els|
|00002c40| 65 0a 09 09 09 09 09 09 | 09 6d 76 20 24 64 65 73 |e.......|.mv $des|
|00002c50| 74 20 24 6d 61 6e 64 69 | 72 2f 6d 61 6e 24 73 65 |t $mandi|r/man$se|
|00002c60| 63 74 69 6f 6e 0a 09 09 | 09 09 09 09 09 64 65 73 |ction...|.....des|
|00002c70| 74 3d 24 6d 61 6e 64 69 | 72 2f 6d 61 6e 24 73 65 |t=$mandi|r/man$se|
|00002c80| 63 74 69 6f 6e 2f 24 64 | 65 73 74 0a 09 09 09 09 |ction/$d|est.....|
|00002c90| 09 09 66 69 0a 09 09 09 | 09 09 09 3b 3b 0a 09 09 |..fi....|...;;...|
|00002ca0| 09 09 65 73 61 63 0a 09 | 09 09 09 65 63 68 6f 20 |..esac..|...echo |
|00002cb0| 24 6e 20 22 5c 6e 4e 72 | 6f 66 66 20 69 74 20 74 |$n "\nNr|off it t|
|00002cc0| 6f 20 24 63 61 74 64 69 | 72 2f 63 61 74 24 7b 73 |o $catdi|r/cat${s|
|00002cd0| 65 63 74 69 6f 6e 7d 3f | 20 5b 79 5d 20 24 63 22 |ection}?| [y] $c"|
|00002ce0| 0a 09 09 09 09 72 65 61 | 64 20 61 6e 73 77 65 72 |.....rea|d answer|
|00002cf0| 0a 09 09 09 09 63 61 73 | 65 20 22 24 61 6e 73 77 |.....cas|e "$answ|
|00002d00| 65 72 22 20 69 6e 0a 09 | 09 09 09 09 71 2a 7c 51 |er" in..|....q*|Q|
|00002d10| 2a 29 0a 09 09 09 09 09 | 09 65 78 69 74 20 30 0a |*)......|.exit 0.|
|00002d20| 09 09 09 09 09 09 3b 3b | 0a 09 09 09 09 09 6e 2a |......;;|......n*|
|00002d30| 7c 4e 2a 29 0a 09 09 09 | 09 09 09 3b 3b 0a 09 09 ||N*)....|...;;...|
|00002d40| 09 09 09 2a 29 0a 09 09 | 09 09 09 09 69 66 20 5b |...*)...|....if [|
|00002d50| 20 21 20 2d 64 20 24 63 | 61 74 64 69 72 2f 63 61 | ! -d $c|atdir/ca|
|00002d60| 74 24 73 65 63 74 69 6f | 6e 20 5d 0a 09 09 09 09 |t$sectio|n ].....|
|00002d70| 09 09 09 74 68 65 6e 0a | 09 09 09 09 09 09 09 69 |...then.|.......i|
|00002d80| 66 20 28 6d 6b 64 69 72 | 20 24 63 61 74 64 69 72 |f (mkdir| $catdir|
|00002d90| 2f 63 61 74 24 73 65 63 | 74 69 6f 6e 20 3e 20 2f |/cat$sec|tion > /|
|00002da0| 64 65 76 2f 6e 75 6c 6c | 20 32 3e 26 31 29 0a 09 |dev/null| 2>&1)..|
|00002db0| 09 09 09 09 09 09 09 74 | 68 65 6e 0a 09 09 09 09 |.......t|hen.....|
|00002dc0| 09 09 09 09 6e 72 6f 66 | 66 20 2d 6d 61 6e 20 24 |....nrof|f -man $|
|00002dd0| 64 65 73 74 20 3e 20 24 | 63 61 74 64 69 72 2f 63 |dest > $|catdir/c|
|00002de0| 61 74 24 73 65 63 74 69 | 6f 6e 2f 24 64 65 73 74 |at$secti|on/$dest|
|00002df0| 0a 09 09 09 09 09 09 09 | 09 24 50 41 47 45 52 20 |........|.$PAGER |
|00002e00| 24 63 61 74 64 69 72 2f | 63 61 74 24 73 65 63 74 |$catdir/|cat$sect|
|00002e10| 69 6f 6e 2f 24 64 65 73 | 74 0a 09 09 09 09 09 09 |ion/$des|t.......|
|00002e20| 09 65 6c 73 65 0a 09 09 | 09 09 09 09 09 09 65 63 |.else...|......ec|
|00002e30| 68 6f 20 22 43 61 6e 27 | 74 20 6d 61 6b 65 20 64 |ho "Can'|t make d|
|00002e40| 69 72 65 63 74 6f 72 79 | 20 24 63 61 74 64 69 72 |irectory| $catdir|
|00002e50| 2f 63 61 74 24 73 65 63 | 74 69 6f 6e 20 2d 2d 20 |/cat$sec|tion -- |
|00002e60| 63 61 6e 27 74 20 6e 72 | 6f 66 66 20 24 64 65 73 |can't nr|off $des|
|00002e70| 74 2e 22 0a 09 09 09 09 | 09 09 09 66 69 0a 09 09 |t.".....|...fi...|
|00002e80| 09 09 09 09 65 6c 73 65 | 0a 09 09 09 09 09 09 09 |....else|........|
|00002e90| 6e 72 6f 66 66 20 2d 6d | 61 6e 20 24 64 65 73 74 |nroff -m|an $dest|
|00002ea0| 20 3e 20 24 63 61 74 64 | 69 72 2f 63 61 74 24 73 | > $catd|ir/cat$s|
|00002eb0| 65 63 74 69 6f 6e 2f 60 | 62 61 73 65 6e 61 6d 65 |ection/`|basename|
|00002ec0| 20 24 64 65 73 74 60 0a | 09 09 09 09 09 09 09 24 | $dest`.|.......$|
|00002ed0| 50 41 47 45 52 20 24 63 | 61 74 64 69 72 2f 63 61 |PAGER $c|atdir/ca|
|00002ee0| 74 24 73 65 63 74 69 6f | 6e 2f 60 62 61 73 65 6e |t$sectio|n/`basen|
|00002ef0| 61 6d 65 20 24 64 65 73 | 74 60 0a 09 09 09 09 09 |ame $des|t`......|
|00002f00| 09 66 69 0a 09 09 09 09 | 09 09 3b 3b 0a 09 09 09 |.fi.....|..;;....|
|00002f10| 09 65 73 61 63 0a 09 09 | 09 09 3b 3b 0a 09 09 09 |.esac...|..;;....|
|00002f20| 2a 29 0a 09 09 09 09 65 | 63 68 6f 20 24 6e 20 22 |*).....e|cho $n "|
|00002f30| 5c 6e 4d 6f 76 65 20 24 | 64 65 73 74 20 74 6f 20 |\nMove $|dest to |
|00002f40| 24 63 61 74 64 69 72 2f | 63 61 74 24 7b 73 65 63 |$catdir/|cat${sec|
|00002f50| 74 69 6f 6e 7d 3f 20 5b | 79 5d 20 24 63 22 0a 09 |tion}? [|y] $c"..|
|00002f60| 09 09 09 72 65 61 64 20 | 61 6e 73 77 65 72 0a 09 |...read |answer..|
|00002f70| 09 09 09 63 61 73 65 20 | 22 24 61 6e 73 77 65 72 |...case |"$answer|
|00002f80| 22 20 69 6e 0a 09 09 09 | 09 09 71 2a 7c 51 2a 29 |" in....|..q*|Q*)|
|00002f90| 0a 09 09 09 09 09 09 65 | 78 69 74 20 30 0a 09 09 |.......e|xit 0...|
|00002fa0| 09 09 09 09 3b 3b 0a 09 | 09 09 09 09 6e 2a 7c 4e |....;;..|....n*|N|
|00002fb0| 2a 29 0a 09 09 09 09 09 | 09 3b 3b 0a 09 09 09 09 |*)......|.;;.....|
|00002fc0| 09 2a 29 0a 09 09 09 09 | 09 09 69 66 20 5b 20 21 |.*).....|..if [ !|
|00002fd0| 20 2d 64 20 24 63 61 74 | 64 69 72 2f 63 61 74 24 | -d $cat|dir/cat$|
|00002fe0| 73 65 63 74 69 6f 6e 20 | 5d 0a 09 09 09 09 09 09 |section |].......|
|00002ff0| 09 74 68 65 6e 0a 09 09 | 09 09 09 09 09 69 66 20 |.then...|.....if |
|00003000| 28 6d 6b 64 69 72 20 24 | 63 61 74 64 69 72 2f 63 |(mkdir $|catdir/c|
|00003010| 61 74 24 73 65 63 74 69 | 6f 6e 20 3e 20 2f 64 65 |at$secti|on > /de|
|00003020| 76 2f 6e 75 6c 6c 20 32 | 3e 26 31 29 0a 09 09 09 |v/null 2|>&1)....|
|00003030| 09 09 09 09 09 74 68 65 | 6e 0a 09 09 09 09 09 09 |.....the|n.......|
|00003040| 09 09 6d 76 20 24 64 65 | 73 74 20 24 63 61 74 64 |..mv $de|st $catd|
|00003050| 69 72 2f 63 61 74 24 73 | 65 63 74 69 6f 6e 2f 24 |ir/cat$s|ection/$|
|00003060| 64 65 73 74 0a 09 09 09 | 09 09 09 09 65 6c 73 65 |dest....|....else|
|00003070| 0a 09 09 09 09 09 09 09 | 09 65 63 68 6f 20 22 43 |........|.echo "C|
|00003080| 61 6e 27 74 20 6d 61 6b | 65 20 64 69 72 65 63 74 |an't mak|e direct|
|00003090| 6f 72 79 20 24 63 61 74 | 64 69 72 2f 63 61 74 24 |ory $cat|dir/cat$|
|000030a0| 73 65 63 74 69 6f 6e 20 | 2d 2d 20 63 61 6e 27 74 |section |-- can't|
|000030b0| 20 6d 6f 76 65 20 24 64 | 65 73 74 2e 22 0a 09 09 | move $d|est."...|
|000030c0| 09 09 09 09 09 66 69 0a | 09 09 09 09 09 09 66 69 |.....fi.|......fi|
|000030d0| 0a 09 09 09 09 09 09 3b | 3b 0a 09 09 09 09 65 73 |.......;|;.....es|
|000030e0| 61 63 0a 09 09 09 09 3b | 3b 0a 09 09 65 73 61 63 |ac.....;|;...esac|
|000030f0| 0a 09 09 3b 3b 0a 09 52 | 45 41 44 2a 7c 2a 2e 3f |...;;..R|EAD*|*.?|
|00003100| 7c 2a 2e 66 69 78 7c 2a | 2e 62 75 67 7c 2a 2e 70 ||*.fix|*|.bug|*.p|
|00003110| 61 74 63 68 29 0a 09 09 | 23 20 77 65 20 61 72 65 |atch)...|# we are|
|00003120| 20 64 65 61 6c 69 6e 67 | 20 77 69 74 68 20 61 20 | dealing| with a |
|00003130| 73 69 6e 67 6c 65 2c 20 | 28 72 65 6c 61 74 69 76 |single, |(relativ|
|00003140| 65 6c 79 21 29 20 73 68 | 6f 72 74 20 70 72 6f 67 |ely!) sh|ort prog|
|00003150| 72 61 6d 0a 0a 09 09 63 | 6f 70 79 3d 79 65 73 0a |ram....c|opy=yes.|
|00003160| 09 09 75 6e 74 69 6c 20 | 5b 20 21 20 2d 73 20 22 |..until |[ ! -s "|
|00003170| 24 64 65 73 74 22 20 5d | 0a 09 09 09 64 6f 0a 09 |$dest" ]|....do..|
|00003180| 09 09 65 63 68 6f 20 24 | 6e 20 22 5c 6e 4f 76 65 |..echo $|n "\nOve|
|00003190| 72 77 72 69 74 65 20 27 | 24 64 65 73 74 27 3f 20 |rwrite '|$dest'? |
|000031a0| 5b 6e 5d 20 24 63 22 0a | 09 09 09 72 65 61 64 20 |[n] $c".|...read |
|000031b0| 61 6e 73 77 65 72 0a 09 | 09 09 63 61 73 65 20 22 |answer..|..case "|
|000031c0| 24 61 6e 73 77 65 72 22 | 20 69 6e 0a 09 09 09 09 |$answer"| in.....|
|000031d0| 71 2a 7c 51 2a 29 0a 09 | 09 09 09 09 65 78 69 74 |q*|Q*)..|....exit|
|000031e0| 20 30 0a 09 09 09 09 09 | 3b 3b 0a 09 09 09 09 79 | 0......|;;.....y|
|000031f0| 2a 7c 59 2a 29 0a 09 09 | 09 09 09 62 72 65 61 6b |*|Y*)...|...break|
|00003200| 0a 09 09 09 09 09 3b 3b | 0a 09 09 09 09 2a 29 0a |......;;|.....*).|
|00003210| 09 09 09 09 09 65 63 68 | 6f 20 24 6e 20 22 41 70 |.....ech|o $n "Ap|
|00003220| 70 65 6e 64 20 74 6f 20 | 27 24 64 65 73 74 27 3f |pend to |'$dest'?|
|00003230| 20 5b 6e 5d 20 24 63 22 | 0a 09 09 09 09 09 72 65 | [n] $c"|......re|
|00003240| 61 64 20 61 6e 73 77 65 | 72 0a 09 09 09 09 09 63 |ad answe|r......c|
|00003250| 61 73 65 20 22 24 61 6e | 73 77 65 72 22 20 69 6e |ase "$an|swer" in|
|00003260| 0a 09 09 09 09 09 09 71 | 2a 7c 51 2a 29 0a 09 09 |.......q|*|Q*)...|
|00003270| 09 09 09 09 09 65 78 69 | 74 20 30 0a 09 09 09 09 |.....exi|t 0.....|
|00003280| 09 09 09 3b 3b 0a 09 09 | 09 09 09 09 79 2a 7c 79 |...;;...|....y*|y|
|00003290| 2a 29 0a 09 09 09 09 09 | 09 09 63 61 74 20 2f 74 |*)......|..cat /t|
|000032a0| 6d 70 2f 6e 65 77 73 72 | 63 24 24 20 3e 3e 20 24 |mp/newsr|c$$ >> $|
|000032b0| 64 65 73 74 0a 09 09 09 | 09 09 09 09 63 6f 70 79 |dest....|....copy|
|000032c0| 3d 6e 6f 0a 09 09 09 09 | 09 09 09 3b 3b 0a 09 09 |=no.....|...;;...|
|000032d0| 09 09 09 09 2a 29 0a 09 | 09 09 09 09 09 09 65 63 |....*)..|......ec|
|000032e0| 68 6f 20 24 6e 20 22 4e | 65 77 20 6e 61 6d 65 3a |ho $n "N|ew name:|
|000032f0| 20 24 63 22 0a 09 09 09 | 09 09 09 09 72 65 61 64 | $c"....|....read|
|00003300| 20 64 65 73 74 0a 09 09 | 09 09 09 09 09 3b 3b 0a | dest...|.....;;.|
|00003310| 09 09 09 09 09 65 73 61 | 63 0a 09 09 09 09 09 3b |.....esa|c......;|
|00003320| 3b 0a 09 09 09 65 73 61 | 63 0a 09 09 64 6f 6e 65 |;....esa|c...done|
|00003330| 0a 09 09 63 61 73 65 20 | 22 24 63 6f 70 79 22 20 |...case |"$copy" |
|00003340| 69 6e 0a 09 09 09 79 65 | 73 29 0a 09 09 09 09 63 |in....ye|s).....c|
|00003350| 70 20 2f 74 6d 70 2f 6e | 65 77 73 72 63 24 24 20 |p /tmp/n|ewsrc$$ |
|00003360| 24 64 65 73 74 0a 09 09 | 09 09 3b 3b 0a 09 09 65 |$dest...|..;;...e|
|00003370| 73 61 63 0a 09 09 65 63 | 68 6f 20 24 6e 20 22 5c |sac...ec|ho $n "\|
|00003380| 6e 45 64 69 74 20 24 7b | 64 65 73 74 7d 3f 20 5b |nEdit ${|dest}? [|
|00003390| 79 5d 20 24 63 22 0a 09 | 09 72 65 61 64 20 61 6e |y] $c"..|.read an|
|000033a0| 73 77 65 72 0a 09 09 63 | 61 73 65 20 22 24 61 6e |swer...c|ase "$an|
|000033b0| 73 77 65 72 22 20 69 6e | 0a 09 09 09 71 2a 7c 51 |swer" in|....q*|Q|
|000033c0| 2a 29 0a 09 09 09 09 65 | 78 69 74 20 30 0a 09 09 |*).....e|xit 0...|
|000033d0| 09 09 3b 3b 0a 09 09 09 | 6e 2a 7c 4e 2a 29 0a 09 |..;;....|n*|N*)..|
|000033e0| 09 09 09 65 63 68 6f 20 | 24 6e 20 22 57 61 6e 74 |...echo |$n "Want|
|000033f0| 20 61 20 73 68 65 6c 6c | 3f 20 5b 79 5d 20 24 63 | a shell|? [y] $c|
|00003400| 22 0a 09 09 09 09 72 65 | 61 64 20 61 6e 73 77 65 |".....re|ad answe|
|00003410| 72 0a 09 09 09 09 63 61 | 73 65 20 22 24 61 6e 73 |r.....ca|se "$ans|
|00003420| 77 65 72 22 20 69 6e 0a | 09 09 09 09 09 71 2a 7c |wer" in.|.....q*||
|00003430| 51 2a 29 0a 09 09 09 09 | 09 09 65 78 69 74 20 30 |Q*).....|..exit 0|
|00003440| 0a 09 09 09 09 09 09 3b | 3b 0a 09 09 09 09 09 6e |.......;|;......n|
|00003450| 2a 7c 4e 2a 29 0a 09 09 | 09 09 09 09 3b 3b 0a 09 |*|N*)...|....;;..|
|00003460| 09 09 09 09 2a 29 0a 09 | 09 09 09 09 09 24 53 48 |....*)..|.....$SH|
|00003470| 45 4c 4c 0a 09 09 09 09 | 09 09 3b 3b 0a 09 09 09 |ELL.....|..;;....|
|00003480| 09 65 73 61 63 0a 09 09 | 09 09 3b 3b 0a 09 09 09 |.esac...|..;;....|
|00003490| 2a 29 0a 09 09 09 09 74 | 72 61 70 20 27 27 20 32 |*).....t|rap '' 2|
|000034a0| 20 33 0a 09 09 09 09 28 | 24 56 49 53 55 41 4c 20 | 3.....(|$VISUAL |
|000034b0| 24 64 65 73 74 29 0a 09 | 09 09 09 74 72 61 70 20 |$dest)..|...trap |
|000034c0| 33 0a 09 09 09 09 3b 3b | 0a 09 09 65 73 61 63 0a |3.....;;|...esac.|
|000034d0| 09 09 63 61 73 65 20 22 | 24 64 65 73 74 22 20 69 |..case "|$dest" i|
|000034e0| 6e 0a 09 09 09 52 45 41 | 44 2a 7c 2a 2e 68 29 0a |n....REA|D*|*.h).|
|000034f0| 09 09 09 09 65 78 69 74 | 20 30 0a 09 09 09 09 3b |....exit| 0.....;|
|00003500| 3b 0a 09 09 09 2a 2e 66 | 69 78 7c 2a 2e 62 75 67 |;....*.f|ix|*.bug|
|00003510| 7c 2a 2e 70 61 74 63 68 | 29 0a 09 09 09 09 65 63 ||*.patch|).....ec|
|00003520| 68 6f 20 24 6e 20 22 57 | 61 6e 74 20 61 20 73 68 |ho $n "W|ant a sh|
|00003530| 65 6c 6c 3f 20 5b 79 5d | 20 24 63 22 0a 09 09 09 |ell? [y]| $c"....|
|00003540| 09 72 65 61 64 20 61 6e | 73 77 65 72 0a 09 09 09 |.read an|swer....|
|00003550| 09 63 61 73 65 20 22 24 | 61 6e 73 77 65 72 22 20 |.case "$|answer" |
|00003560| 69 6e 0a 09 09 09 09 09 | 71 2a 7c 51 2a 29 0a 09 |in......|q*|Q*)..|
|00003570| 09 09 09 09 09 65 78 69 | 74 20 30 0a 09 09 09 09 |.....exi|t 0.....|
|00003580| 09 09 3b 3b 0a 09 09 09 | 09 09 6e 2a 7c 4e 2a 29 |..;;....|..n*|N*)|
|00003590| 0a 09 09 09 09 09 09 3b | 3b 0a 09 09 09 09 09 2a |.......;|;......*|
|000035a0| 29 0a 09 09 09 09 09 09 | 24 53 48 45 4c 4c 0a 09 |).......|$SHELL..|
|000035b0| 09 09 09 09 09 3b 3b 0a | 09 09 09 09 65 73 61 63 |.....;;.|....esac|
|000035c0| 0a 09 09 09 09 65 78 69 | 74 20 30 0a 09 09 09 09 |.....exi|t 0.....|
|000035d0| 3b 3b 0a 09 09 65 73 61 | 63 0a 0a 09 09 23 20 73 |;;...esa|c....# s|
|000035e0| 65 74 20 75 70 20 61 20 | 73 75 6d 6d 61 72 79 20 |et up a |summary |
|000035f0| 66 6f 72 20 6c 61 74 65 | 72 20 75 73 65 0a 0a 09 |for late|r use...|
|00003600| 09 65 63 68 6f 20 24 6e | 20 22 5c 6e 31 2f 32 2d |.echo $n| "\n1/2-|
|00003610| 6c 69 6e 65 20 70 72 6f | 67 72 61 6d 20 73 75 6d |line pro|gram sum|
|00003620| 6d 61 72 79 3a 20 24 63 | 22 0a 09 09 72 65 61 64 |mary: $c|"...read|
|00003630| 20 62 6c 75 72 62 0a 0a | 09 09 23 20 69 66 20 22 | blurb..|..# if "|
|00003640| 6d 61 6b 65 66 69 6c 65 | 22 20 65 78 69 73 74 73 |makefile|" exists|
|00003650| 2c 20 61 64 64 20 69 74 | 20 74 6f 20 22 4d 61 6b |, add it| to "Mak|
|00003660| 65 66 69 6c 65 22 2c 20 | 66 6f 72 20 63 6f 6e 73 |efile", |for cons|
|00003670| 69 73 74 65 6e 63 79 0a | 0a 09 09 69 66 20 5b 20 |istency.|...if [ |
|00003680| 2d 73 20 22 6d 61 6b 65 | 66 69 6c 65 22 20 5d 0a |-s "make|file" ].|
|00003690| 09 09 09 74 68 65 6e 0a | 09 09 09 63 61 74 20 6d |...then.|...cat m|
|000036a0| 61 6b 65 66 69 6c 65 20 | 3e 3e 20 4d 61 6b 65 66 |akefile |>> Makef|
|000036b0| 69 6c 65 0a 09 09 09 72 | 6d 20 6d 61 6b 65 66 69 |ile....r|m makefi|
|000036c0| 6c 65 0a 09 09 09 65 64 | 20 2d 20 4d 61 6b 65 66 |le....ed| - Makef|
|000036d0| 69 6c 65 20 3c 3c 20 2b | 2b 2b 2b 0a 09 09 09 67 |ile << +|+++....g|
|000036e0| 2f 6d 61 6b 65 66 69 6c | 65 2f 73 2f 2f 4d 61 6b |/makefil|e/s//Mak|
|000036f0| 65 66 69 6c 65 2f 67 0a | 09 09 09 77 0a 2b 2b 2b |efile/g.|...w.+++|
|00003700| 2b 0a 09 09 66 69 0a 0a | 09 09 23 20 61 64 64 20 |+...fi..|..# add |
|00003710| 61 20 4d 61 6b 65 66 69 | 6c 65 20 65 6e 74 72 79 |a Makefi|le entry|
|00003720| 20 69 66 20 74 68 65 72 | 65 20 69 73 6e 27 74 20 | if ther|e isn't |
|00003730| 6f 6e 65 20 74 68 65 72 | 65 20 61 6c 72 65 61 64 |one ther|e alread|
|00003740| 79 0a 0a 09 09 62 6e 61 | 6d 65 3d 60 62 61 73 65 |y....bna|me=`base|
|00003750| 6e 61 6d 65 20 24 64 65 | 73 74 20 2e 63 60 0a 09 |name $de|st .c`..|
|00003760| 09 63 61 73 65 20 22 60 | 67 72 65 70 20 5c 22 5e |.case "`|grep \"^|
|00003770| 24 7b 62 6e 61 6d 65 7d | 3a 09 5c 22 20 4d 61 6b |${bname}|:.\" Mak|
|00003780| 65 66 69 6c 65 60 22 20 | 69 6e 0a 09 09 09 22 22 |efile`" |in....""|
|00003790| 29 0a 09 09 09 09 65 63 | 68 6f 20 24 6e 20 22 57 |).....ec|ho $n "W|
|000037a0| 61 6e 74 20 61 20 4d 61 | 6b 65 66 69 6c 65 20 65 |ant a Ma|kefile e|
|000037b0| 6e 74 72 79 3f 20 5b 79 | 5d 20 24 63 22 0a 09 09 |ntry? [y|] $c"...|
|000037c0| 09 09 72 65 61 64 20 61 | 6e 73 77 65 72 0a 09 09 |..read a|nswer...|
|000037d0| 09 09 63 61 73 65 20 22 | 24 61 6e 73 77 65 72 22 |..case "|$answer"|
|000037e0| 20 69 6e 0a 09 09 09 09 | 09 71 2a 7c 51 2a 29 0a | in.....|.q*|Q*).|
|000037f0| 09 09 09 09 09 09 65 78 | 69 74 20 30 0a 09 09 09 |......ex|it 0....|
|00003800| 09 09 09 3b 3b 0a 09 09 | 09 09 09 6e 2a 7c 4e 2a |...;;...|...n*|N*|
|00003810| 29 0a 09 09 09 09 09 09 | 3b 3b 0a 09 09 09 09 09 |).......|;;......|
|00003820| 2a 29 0a 09 09 09 09 09 | 09 65 63 68 6f 20 22 5c |*)......|.echo "\|
|00003830| 6e 23 20 24 62 6e 61 6d | 65 20 2d 2d 20 24 62 6c |n# $bnam|e -- $bl|
|00003840| 75 72 62 5c 6e 22 20 3e | 3e 20 4d 61 6b 65 66 69 |urb\n" >|> Makefi|
|00003850| 6c 65 0a 09 09 09 09 09 | 09 65 63 68 6f 20 22 44 |le......|.echo "D|
|00003860| 65 66 61 75 6c 74 3a 5c | 6e 5c 6e 24 62 6e 61 6d |efault:\|n\n$bnam|
|00003870| 65 3a 20 24 62 6e 61 6d | 65 2e 6f 5c 6e 09 63 63 |e: $bnam|e.o\n.cc|
|00003880| 20 5c 24 28 43 46 4c 41 | 47 53 29 20 24 62 6e 61 | \$(CFLA|GS) $bna|
|00003890| 6d 65 2e 6f 20 2d 6f 20 | 24 62 6e 61 6d 65 22 0a |me.o -o |$bname".|
|000038a0| 09 09 09 09 09 09 65 63 | 68 6f 20 24 6e 20 22 5c |......ec|ho $n "\|
|000038b0| 6e 4f 4b 20 61 73 20 74 | 68 65 20 4d 61 6b 65 66 |nOK as t|he Makef|
|000038c0| 69 6c 65 20 65 6e 74 72 | 79 3f 20 5b 79 5d 20 24 |ile entr|y? [y] $|
|000038d0| 63 22 0a 09 09 09 09 09 | 09 72 65 61 64 20 61 6e |c"......|.read an|
|000038e0| 73 77 65 72 0a 09 09 09 | 09 09 09 63 61 73 65 20 |swer....|...case |
|000038f0| 22 24 61 6e 73 77 65 72 | 22 20 69 6e 0a 09 09 09 |"$answer|" in....|
|00003900| 09 09 09 09 71 2a 7c 51 | 2a 29 0a 09 09 09 09 09 |....q*|Q|*)......|
|00003910| 09 09 09 65 78 69 74 20 | 30 0a 09 09 09 09 09 09 |...exit |0.......|
|00003920| 09 09 3b 3b 0a 09 09 09 | 09 09 09 09 79 2a 7c 59 |..;;....|....y*|Y|
|00003930| 2a 7c 22 22 29 0a 09 09 | 09 09 09 09 09 09 65 63 |*|"")...|......ec|
|00003940| 68 6f 20 22 24 62 6e 61 | 6d 65 3a 20 24 62 6e 61 |ho "$bna|me: $bna|
|00003950| 6d 65 2e 6f 22 20 3e 3e | 20 4d 61 6b 65 66 69 6c |me.o" >>| Makefil|
|00003960| 65 0a 09 09 09 09 09 09 | 09 09 65 63 68 6f 20 22 |e.......|..echo "|
|00003970| 09 63 63 20 5c 24 28 43 | 46 4c 41 47 53 29 20 24 |.cc \$(C|FLAGS) $|
|00003980| 62 6e 61 6d 65 2e 6f 20 | 2d 6f 20 24 62 6e 61 6d |bname.o |-o $bnam|
|00003990| 65 22 20 3e 3e 20 4d 61 | 6b 65 66 69 6c 65 0a 09 |e" >> Ma|kefile..|
|000039a0| 09 09 09 09 09 09 09 3b | 3b 0a 09 09 09 09 09 09 |.......;|;.......|
|000039b0| 09 2a 29 0a 09 09 09 09 | 09 09 09 09 65 63 68 6f |.*).....|....echo|
|000039c0| 20 24 6e 20 22 5c 6e 43 | 6f 6d 70 6c 65 74 65 20 | $n "\nC|omplete |
|000039d0| 4d 61 6b 65 66 69 6c 65 | 20 65 6e 74 72 79 20 28 |Makefile| entry (|
|000039e0| 2e 20 74 6f 20 65 6e 64 | 29 5c 6e 3e 20 24 63 22 |. to end|)\n> $c"|
|000039f0| 0a 09 09 09 09 09 09 09 | 09 72 65 61 64 20 69 6e |........|.read in|
|00003a00| 73 74 72 75 63 74 0a 09 | 09 09 09 09 09 09 09 65 |struct..|.......e|
|00003a10| 63 68 6f 20 22 24 69 6e | 73 74 72 75 63 74 22 20 |cho "$in|struct" |
|00003a20| 3e 3e 20 4d 61 6b 65 66 | 69 6c 65 0a 09 09 09 09 |>> Makef|ile.....|
|00003a30| 09 09 09 09 69 6e 73 74 | 72 75 63 74 3d 0a 09 09 |....inst|ruct=...|
|00003a40| 09 09 09 09 09 09 77 68 | 69 6c 65 20 3a 0a 09 09 |......wh|ile :...|
|00003a50| 09 09 09 09 09 09 09 64 | 6f 0a 09 09 09 09 09 09 |.......d|o.......|
|00003a60| 09 09 09 65 63 68 6f 20 | 24 6e 20 22 3e 20 24 63 |...echo |$n "> $c|
|00003a70| 22 0a 09 09 09 09 09 09 | 09 09 09 72 65 61 64 20 |".......|...read |
|00003a80| 69 6e 73 74 72 75 63 74 | 0a 09 09 09 09 09 09 09 |instruct|........|
|00003a90| 09 09 63 61 73 65 20 22 | 24 69 6e 73 74 72 75 63 |..case "|$instruc|
|00003aa0| 74 22 20 69 6e 0a 09 09 | 09 09 09 09 09 09 09 09 |t" in...|........|
|00003ab0| 2e 29 0a 09 09 09 09 09 | 09 09 09 09 09 09 62 72 |.)......|......br|
|00003ac0| 65 61 6b 0a 09 09 09 09 | 09 09 09 09 09 09 09 3b |eak.....|.......;|
|00003ad0| 3b 0a 09 09 09 09 09 09 | 09 09 09 65 73 61 63 0a |;.......|...esac.|
|00003ae0| 09 09 09 09 09 09 09 09 | 09 65 63 68 6f 20 22 09 |........|.echo ".|
|00003af0| 24 69 6e 73 74 72 75 63 | 74 22 20 3e 3e 20 4d 61 |$instruc|t" >> Ma|
|00003b00| 6b 65 66 69 6c 65 09 23 | 20 74 61 62 20 69 73 20 |kefile.#| tab is |
|00003b10| 65 73 73 65 6e 74 69 61 | 6c 0a 09 09 09 09 09 09 |essentia|l.......|
|00003b20| 09 09 64 6f 6e 65 0a 09 | 09 09 09 09 09 09 09 3b |..done..|.......;|
|00003b30| 3b 0a 09 09 09 09 09 09 | 65 73 61 63 0a 09 09 09 |;.......|esac....|
|00003b40| 09 09 09 3b 3b 0a 09 09 | 09 09 65 73 61 63 0a 09 |...;;...|..esac..|
|00003b50| 09 09 09 3b 3b 0a 09 09 | 65 73 61 63 0a 09 09 3b |...;;...|esac...;|
|00003b60| 3b 0a 09 2a 29 0a 09 09 | 23 20 77 65 20 61 72 65 |;..*)...|# we are|
|00003b70| 20 70 72 6f 62 61 62 6c | 79 20 67 6f 69 6e 67 20 | probabl|y going |
|00003b80| 74 6f 20 6d 61 6b 65 20 | 61 20 6e 65 77 20 64 69 |to make |a new di|
|00003b90| 72 65 63 74 6f 72 79 20 | 66 6f 72 20 74 68 69 73 |rectory |for this|
|00003ba0| 20 6f 6e 65 0a 0a 09 09 | 6e 65 77 64 69 72 3d 74 | one....|newdir=t|
|00003bb0| 72 75 65 0a 09 09 69 66 | 20 5b 20 2d 64 20 22 24 |rue...if| [ -d "$|
|00003bc0| 64 65 73 74 22 20 5d 0a | 09 09 09 74 68 65 6e 0a |dest" ].|...then.|
|00003bd0| 09 09 09 65 63 68 6f 20 | 24 6e 20 22 5c 6e 24 64 |...echo |$n "\n$d|
|00003be0| 65 73 74 20 61 6c 72 65 | 61 64 79 20 65 78 69 73 |est alre|ady exis|
|00003bf0| 74 73 20 2d 2d 20 70 75 | 74 20 74 68 65 20 73 74 |ts -- pu|t the st|
|00003c00| 75 66 66 20 74 68 65 72 | 65 3f 20 5b 79 5d 20 24 |uff ther|e? [y] $|
|00003c10| 63 22 0a 09 09 09 72 65 | 61 64 20 61 6e 73 77 65 |c"....re|ad answe|
|00003c20| 72 0a 09 09 09 63 61 73 | 65 20 22 24 61 6e 73 77 |r....cas|e "$answ|
|00003c30| 65 72 22 20 69 6e 0a 09 | 09 09 09 71 2a 7c 51 2a |er" in..|...q*|Q*|
|00003c40| 29 0a 09 09 09 09 09 65 | 78 69 74 20 30 0a 09 09 |)......e|xit 0...|
|00003c50| 09 09 09 3b 3b 0a 09 09 | 09 09 6e 2a 7c 4e 2a 29 |...;;...|..n*|N*)|
|00003c60| 0a 09 09 09 09 09 65 63 | 68 6f 20 24 6e 20 22 4e |......ec|ho $n "N|
|00003c70| 65 77 20 64 69 72 65 63 | 74 6f 72 79 20 6e 61 6d |ew direc|tory nam|
|00003c80| 65 3a 20 24 63 22 0a 09 | 09 09 09 09 72 65 61 64 |e: $c"..|....read|
|00003c90| 20 64 65 73 74 0a 09 09 | 09 09 09 3b 3b 0a 09 09 | dest...|...;;...|
|00003ca0| 09 09 2a 29 0a 09 09 09 | 09 09 6e 65 77 64 69 72 |..*)....|..newdir|
|00003cb0| 3d 66 61 6c 73 65 0a 09 | 09 09 09 09 3b 3b 0a 09 |=false..|....;;..|
|00003cc0| 09 09 65 73 61 63 0a 09 | 09 66 69 0a 09 09 69 66 |..esac..|.fi...if|
|00003cd0| 20 28 24 6e 65 77 64 69 | 72 29 0a 09 09 09 74 68 | ($newdi|r)....th|
|00003ce0| 65 6e 0a 09 09 09 75 6e | 74 69 6c 20 28 20 6d 6b |en....un|til ( mk|
|00003cf0| 64 69 72 20 22 24 64 65 | 73 74 22 20 3e 20 2f 64 |dir "$de|st" > /d|
|00003d00| 65 76 2f 6e 75 6c 6c 20 | 32 3e 26 31 20 29 0a 09 |ev/null |2>&1 )..|
|00003d10| 09 09 09 64 6f 0a 09 09 | 09 09 65 63 68 6f 20 24 |...do...|..echo $|
|00003d20| 6e 20 22 43 61 6e 27 74 | 20 6d 61 6b 65 20 27 24 |n "Can't| make '$|
|00003d30| 64 65 73 74 27 2e 5c 6e | 4e 65 77 20 6e 61 6d 65 |dest'.\n|New name|
|00003d40| 3a 20 24 63 22 0a 09 09 | 09 09 72 65 61 64 20 64 |: $c"...|..read d|
|00003d50| 65 73 74 0a 09 09 09 64 | 6f 6e 65 0a 09 09 66 69 |est....d|one...fi|
|00003d60| 0a 0a 09 09 63 64 20 24 | 64 65 73 74 20 7c 7c 20 |....cd $|dest || |
|00003d70| 65 78 69 74 20 31 0a 0a | 09 09 23 20 73 65 74 20 |exit 1..|..# set |
|00003d80| 75 70 20 61 20 73 75 6d | 6d 61 72 79 20 66 6f 72 |up a sum|mary for|
|00003d90| 20 6c 61 74 65 72 20 75 | 73 65 0a 0a 09 09 65 63 | later u|se....ec|
|00003da0| 68 6f 20 24 6e 20 22 5c | 6e 31 2f 32 2d 6c 69 6e |ho $n "\|n1/2-lin|
|00003db0| 65 20 70 72 6f 67 72 61 | 6d 20 64 65 73 63 72 69 |e progra|m descri|
|00003dc0| 70 74 69 6f 6e 3a 20 24 | 63 22 0a 09 09 72 65 61 |ption: $|c"...rea|
|00003dd0| 64 20 62 6c 75 72 62 0a | 0a 09 09 65 63 68 6f 20 |d blurb.|...echo |
|00003de0| 24 6e 20 22 5c 6e 55 6e | 73 68 61 72 20 69 74 3f |$n "\nUn|shar it?|
|00003df0| 20 5b 79 5d 20 24 63 22 | 0a 09 09 72 65 61 64 20 | [y] $c"|...read |
|00003e00| 61 6e 73 77 65 72 0a 09 | 09 63 61 73 65 20 22 24 |answer..|.case "$|
|00003e10| 61 6e 73 77 65 72 22 20 | 69 6e 0a 09 09 09 71 2a |answer" |in....q*|
|00003e20| 7c 51 2a 29 0a 09 09 09 | 09 65 78 69 74 20 30 0a ||Q*)....|.exit 0.|
|00003e30| 09 09 09 09 3b 3b 0a 09 | 09 09 6e 2a 7c 4e 2a 29 |....;;..|..n*|N*)|
|00003e40| 0a 09 09 09 09 65 63 68 | 6f 20 24 6e 20 22 5c 6e |.....ech|o $n "\n|
|00003e50| 45 64 69 74 20 69 74 3f | 20 5b 79 5d 20 24 63 22 |Edit it?| [y] $c"|
|00003e60| 0a 09 09 09 09 72 65 61 | 64 20 61 6e 73 77 65 72 |.....rea|d answer|
|00003e70| 0a 09 09 09 09 63 61 73 | 65 20 22 24 61 6e 73 77 |.....cas|e "$answ|
|00003e80| 65 72 22 20 69 6e 0a 09 | 09 09 09 09 71 2a 7c 51 |er" in..|....q*|Q|
|00003e90| 2a 29 0a 09 09 09 09 09 | 09 65 78 69 74 20 30 0a |*)......|.exit 0.|
|00003ea0| 09 09 09 09 09 09 3b 3b | 0a 09 09 09 09 09 6e 2a |......;;|......n*|
|00003eb0| 7c 4e 2a 29 0a 09 09 09 | 09 09 09 65 63 68 6f 20 ||N*)....|...echo |
|00003ec0| 24 6e 20 22 57 61 6e 74 | 20 61 20 73 68 65 6c 6c |$n "Want| a shell|
|00003ed0| 3f 20 5b 79 5d 20 24 63 | 22 0a 09 09 09 09 09 09 |? [y] $c|".......|
|00003ee0| 72 65 61 64 20 61 6e 73 | 77 65 72 0a 09 09 09 09 |read ans|wer.....|
|00003ef0| 09 09 63 61 73 65 20 22 | 24 61 6e 73 77 65 72 22 |..case "|$answer"|
|00003f00| 20 69 6e 0a 09 09 09 09 | 09 09 09 71 2a 7c 51 2a | in.....|...q*|Q*|
|00003f10| 29 0a 09 09 09 09 09 09 | 09 09 65 78 69 74 20 30 |).......|..exit 0|
|00003f20| 0a 09 09 09 09 09 09 09 | 09 3b 3b 0a 09 09 09 09 |........|.;;.....|
|00003f30| 09 09 09 6e 2a 7c 4e 2a | 29 0a 09 09 09 09 09 09 |...n*|N*|).......|
|00003f40| 09 09 3b 3b 0a 09 09 09 | 09 09 09 09 2a 29 0a 09 |..;;....|....*)..|
|00003f50| 09 09 09 09 09 09 09 24 | 53 48 45 4c 4c 0a 09 09 |.......$|SHELL...|
|00003f60| 09 09 09 09 09 09 3b 3b | 0a 09 09 09 09 09 09 65 |......;;|.......e|
|00003f70| 73 61 63 0a 09 09 09 09 | 09 09 3b 3b 0a 09 09 09 |sac.....|..;;....|
|00003f80| 09 09 2a 29 0a 09 09 09 | 09 09 09 74 72 61 70 20 |..*)....|...trap |
|00003f90| 27 27 20 32 20 33 0a 09 | 09 09 09 09 09 28 24 56 |'' 2 3..|.....($V|
|00003fa0| 49 53 55 41 4c 20 2f 74 | 6d 70 2f 6e 65 77 73 72 |ISUAL /t|mp/newsr|
|00003fb0| 63 24 24 29 0a 09 09 09 | 09 09 09 74 72 61 70 20 |c$$)....|...trap |
|00003fc0| 33 0a 09 09 09 09 09 09 | 3b 3b 0a 09 09 09 09 65 |3.......|;;.....e|
|00003fd0| 73 61 63 0a 09 09 09 09 | 24 6c 73 0a 09 09 09 09 |sac.....|$ls.....|
|00003fe0| 65 63 68 6f 20 24 6e 20 | 22 5c 6e 63 70 20 2f 74 |echo $n |"\ncp /t|
|00003ff0| 6d 70 2f 6e 65 77 73 72 | 63 24 24 20 77 68 61 74 |mp/newsr|c$$ what|
|00004000| 3f 20 5b 52 45 54 55 52 | 4e 20 3d 20 6e 6f 20 63 |? [RETUR|N = no c|
|00004010| 6f 70 79 5d 20 24 63 22 | 0a 09 09 09 09 72 65 61 |opy] $c"|.....rea|
|00004020| 64 20 6e 61 6d 65 0a 09 | 09 09 09 63 61 73 65 20 |d name..|...case |
|00004030| 22 24 6e 61 6d 65 22 20 | 69 6e 0a 09 09 09 09 09 |"$name" |in......|
|00004040| 22 22 29 0a 09 09 09 09 | 09 09 3b 3b 0a 09 09 09 |"").....|..;;....|
|00004050| 09 09 2a 29 0a 09 09 09 | 09 09 09 63 70 20 2f 74 |..*)....|...cp /t|
|00004060| 6d 70 2f 6e 65 77 73 72 | 63 24 24 20 24 6e 61 6d |mp/newsr|c$$ $nam|
|00004070| 65 0a 09 09 09 09 09 09 | 3b 3b 0a 09 09 09 09 65 |e.......|;;.....e|
|00004080| 73 61 63 0a 09 09 09 09 | 3b 3b 0a 09 09 09 2a 29 |sac.....|;;....*)|
|00004090| 0a 09 09 09 09 75 6e 73 | 68 61 72 20 2f 74 6d 70 |.....uns|har /tmp|
|000040a0| 2f 6e 65 77 73 72 63 24 | 24 0a 09 09 09 09 24 6c |/newsrc$|$.....$l|
|000040b0| 73 0a 09 09 09 09 65 63 | 68 6f 20 24 6e 20 22 5c |s.....ec|ho $n "\|
|000040c0| 6e 44 69 64 20 74 68 61 | 74 20 65 78 74 72 61 63 |nDid tha|t extrac|
|000040d0| 74 20 4f 4b 3f 20 5b 79 | 5d 20 24 63 22 0a 09 09 |t OK? [y|] $c"...|
|000040e0| 09 09 72 65 61 64 20 61 | 6e 73 77 65 72 0a 09 09 |..read a|nswer...|
|000040f0| 09 09 63 61 73 65 20 22 | 24 61 6e 73 77 65 72 22 |..case "|$answer"|
|00004100| 20 69 6e 0a 09 09 09 09 | 09 71 2a 7c 51 2a 29 0a | in.....|.q*|Q*).|
|00004110| 09 09 09 09 09 09 65 78 | 69 74 20 30 0a 09 09 09 |......ex|it 0....|
|00004120| 09 09 09 3b 3b 0a 09 09 | 09 09 09 6e 2a 7c 4e 2a |...;;...|...n*|N*|
|00004130| 29 0a 09 09 09 09 09 09 | 65 63 68 6f 20 22 53 74 |).......|echo "St|
|00004140| 61 72 74 69 6e 67 20 61 | 20 73 68 65 6c 6c 2e 22 |arting a| shell."|
|00004150| 0a 09 09 09 09 09 09 74 | 72 61 70 20 27 27 20 32 |.......t|rap '' 2|
|00004160| 20 33 0a 09 09 09 09 09 | 09 28 24 53 48 45 4c 4c | 3......|.($SHELL|
|00004170| 29 0a 09 09 09 09 09 09 | 74 72 61 70 20 33 0a 09 |).......|trap 3..|
|00004180| 09 09 09 09 09 24 6c 73 | 0a 09 09 09 09 09 09 65 |.....$ls|.......e|
|00004190| 63 68 6f 20 24 6e 20 22 | 5c 6e 63 70 20 2f 74 6d |cho $n "|\ncp /tm|
|000041a0| 70 2f 6e 65 77 73 72 63 | 24 24 20 77 68 61 74 3f |p/newsrc|$$ what?|
|000041b0| 20 5b 52 45 54 55 52 4e | 20 3d 20 6e 6f 20 63 6f | [RETURN| = no co|
|000041c0| 70 79 5d 20 24 63 22 0a | 09 09 09 09 09 09 72 65 |py] $c".|......re|
|000041d0| 61 64 20 6e 61 6d 65 0a | 09 09 09 09 09 09 63 61 |ad name.|......ca|
|000041e0| 73 65 20 22 24 6e 61 6d | 65 22 20 69 6e 0a 09 09 |se "$nam|e" in...|
|000041f0| 09 09 09 09 09 22 22 29 | 0a 09 09 09 09 09 09 09 |....."")|........|
|00004200| 09 3b 3b 0a 09 09 09 09 | 09 09 09 2a 29 0a 09 09 |.;;.....|...*)...|
|00004210| 09 09 09 09 09 09 63 70 | 20 2f 74 6d 70 2f 6e 65 |......cp| /tmp/ne|
|00004220| 77 73 72 63 24 24 20 24 | 6e 61 6d 65 0a 09 09 09 |wsrc$$ $|name....|
|00004230| 09 09 09 09 09 3b 3b 0a | 09 09 09 09 09 09 65 73 |.....;;.|......es|
|00004240| 61 63 0a 09 09 09 09 09 | 09 3b 3b 0a 09 09 09 09 |ac......|.;;.....|
|00004250| 65 73 61 63 0a 09 09 09 | 09 3b 3b 0a 09 09 65 73 |esac....|.;;...es|
|00004260| 61 63 0a 09 09 69 66 20 | 5b 20 2d 73 20 22 52 45 |ac...if |[ -s "RE|
|00004270| 41 44 4d 45 22 20 2d 6f | 20 2d 73 20 22 52 45 41 |ADME" -o| -s "REA|
|00004280| 44 5f 4d 45 22 20 5d 0a | 09 09 09 74 68 65 6e 0a |D_ME" ].|...then.|
|00004290| 09 09 09 65 63 68 6f 20 | 24 6e 20 22 5c 6e 53 65 |...echo |$n "\nSe|
|000042a0| 65 20 74 68 65 20 52 45 | 41 44 4d 45 3f 20 5b 79 |e the RE|ADME? [y|
|000042b0| 5d 20 24 63 22 0a 09 09 | 09 72 65 61 64 20 61 6e |] $c"...|.read an|
|000042c0| 73 77 65 72 0a 09 09 09 | 63 61 73 65 20 22 24 61 |swer....|case "$a|
|000042d0| 6e 73 77 65 72 22 20 69 | 6e 0a 09 09 09 09 71 2a |nswer" i|n.....q*|
|000042e0| 7c 51 2a 29 0a 09 09 09 | 09 09 65 78 69 74 20 30 ||Q*)....|..exit 0|
|000042f0| 0a 09 09 09 09 09 3b 3b | 0a 09 09 09 09 6e 2a 7c |......;;|.....n*||
|00004300| 4e 2a 29 0a 09 09 09 09 | 09 3b 3b 0a 09 09 09 09 |N*).....|.;;.....|
|00004310| 2a 29 0a 09 09 09 09 09 | 24 50 41 47 45 52 20 52 |*)......|$PAGER R|
|00004320| 45 41 44 2a 0a 09 09 09 | 09 09 3b 3b 0a 09 09 09 |EAD*....|..;;....|
|00004330| 65 73 61 63 0a 09 09 65 | 6c 73 65 0a 09 09 09 65 |esac...e|lse....e|
|00004340| 63 68 6f 20 24 6e 20 22 | 5c 6e 45 64 69 74 20 61 |cho $n "|\nEdit a|
|00004350| 20 52 45 41 44 4d 45 3f | 20 5b 79 5d 20 24 63 22 | README?| [y] $c"|
|00004360| 0a 09 09 09 72 65 61 64 | 20 61 6e 73 77 65 72 0a |....read| answer.|
|00004370| 09 09 09 63 61 73 65 20 | 22 24 61 6e 73 77 65 72 |...case |"$answer|
|00004380| 22 20 69 6e 0a 09 09 09 | 09 71 2a 7c 51 2a 29 0a |" in....|.q*|Q*).|
|00004390| 09 09 09 09 09 65 78 69 | 74 20 30 0a 09 09 09 09 |.....exi|t 0.....|
|000043a0| 09 3b 3b 0a 09 09 09 09 | 6e 2a 7c 4e 2a 29 0a 09 |.;;.....|n*|N*)..|
|000043b0| 09 09 09 09 3b 3b 0a 09 | 09 09 09 2a 29 0a 09 09 |....;;..|...*)...|
|000043c0| 09 09 09 74 72 61 70 20 | 27 27 20 32 20 33 0a 09 |...trap |'' 2 3..|
|000043d0| 09 09 09 09 28 24 56 49 | 53 55 41 4c 20 52 45 41 |....($VI|SUAL REA|
|000043e0| 44 4d 45 29 0a 09 09 09 | 09 09 74 72 61 70 20 33 |DME)....|..trap 3|
|000043f0| 0a 09 09 09 09 09 3b 3b | 0a 09 09 09 65 73 61 63 |......;;|....esac|
|00004400| 0a 09 09 66 69 0a 0a 09 | 09 23 20 6d 61 6e 75 61 |...fi...|.# manua|
|00004410| 6c 20 70 61 67 65 73 0a | 0a 09 09 66 6f 72 20 69 |l pages.|...for i|
|00004420| 20 69 6e 20 60 6c 73 20 | 2a 2e 5b 31 2d 38 5d 20 | in `ls |*.[1-8] |
|00004430| 32 3e 20 2f 64 65 76 2f | 6e 75 6c 6c 60 0a 09 09 |2> /dev/|null`...|
|00004440| 09 64 6f 0a 09 09 09 70 | 61 67 65 3d 24 69 0a 09 |.do....p|age=$i..|
|00004450| 09 09 63 61 73 65 20 22 | 60 66 69 6c 65 20 24 69 |..case "|`file $i|
|00004460| 60 22 20 69 6e 0a 09 09 | 09 09 2a 72 6f 66 66 2a |`" in...|..*roff*|
|00004470| 29 0a 09 09 09 09 09 73 | 65 63 74 69 6f 6e 3d 60 |)......s|ection=`|
|00004480| 65 78 70 72 20 22 24 69 | 22 20 3a 20 27 2e 2a 5c |expr "$i|" : '.*\|
|00004490| 2e 5c 28 2e 2a 5c 29 27 | 60 0a 09 09 09 09 09 65 |.\(.*\)'|`......e|
|000044a0| 63 68 6f 20 24 6e 20 22 | 5c 6e 24 69 20 2d 2d 20 |cho $n "|\n$i -- |
|000044b0| 6d 61 6e 20 70 61 67 65 | 20 73 6f 75 72 63 65 2e |man page| source.|
|000044c0| 20 43 6f 70 79 20 74 6f | 20 24 6d 61 6e 64 69 72 | Copy to| $mandir|
|000044d0| 2f 6d 61 6e 24 7b 73 65 | 63 74 69 6f 6e 7d 3f 20 |/man${se|ction}? |
|000044e0| 5b 79 5d 20 24 63 22 0a | 09 09 09 09 09 72 65 61 |[y] $c".|.....rea|
|000044f0| 64 20 61 6e 73 77 65 72 | 0a 09 09 09 09 09 63 61 |d answer|......ca|
|00004500| 73 65 20 22 24 61 6e 73 | 77 65 72 22 20 69 6e 0a |se "$ans|wer" in.|
|00004510| 09 09 09 09 09 09 71 2a | 7c 51 2a 29 0a 09 09 09 |......q*||Q*)....|
|00004520| 09 09 09 09 65 78 69 74 | 20 30 0a 09 09 09 09 09 |....exit| 0......|
|00004530| 09 09 3b 3b 0a 09 09 09 | 09 09 09 6e 2a 7c 4e 2a |..;;....|...n*|N*|
|00004540| 29 0a 09 09 09 09 09 09 | 09 3b 3b 0a 09 09 09 09 |).......|.;;.....|
|00004550| 09 09 2a 29 0a 09 09 09 | 09 09 09 09 69 66 20 5b |..*)....|....if [|
|00004560| 20 21 20 2d 64 20 24 6d | 61 6e 64 69 72 2f 6d 61 | ! -d $m|andir/ma|
|00004570| 6e 24 73 65 63 74 69 6f | 6e 20 5d 0a 09 09 09 09 |n$sectio|n ].....|
|00004580| 09 09 09 09 74 68 65 6e | 0a 09 09 09 09 09 09 09 |....then|........|
|00004590| 09 69 66 20 28 6d 6b 64 | 69 72 20 24 6d 61 6e 64 |.if (mkd|ir $mand|
|000045a0| 69 72 2f 6d 61 6e 24 73 | 65 63 74 69 6f 6e 20 3e |ir/man$s|ection >|
|000045b0| 20 2f 64 65 76 2f 6e 75 | 6c 6c 20 32 3e 26 31 29 | /dev/nu|ll 2>&1)|
|000045c0| 0a 09 09 09 09 09 09 09 | 09 09 74 68 65 6e 0a 09 |........|..then..|
|000045d0| 09 09 09 09 09 09 09 09 | 63 70 20 24 69 20 24 6d |........|cp $i $m|
|000045e0| 61 6e 64 69 72 2f 6d 61 | 6e 24 73 65 63 74 69 6f |andir/ma|n$sectio|
|000045f0| 6e 0a 09 09 09 09 09 09 | 09 09 09 70 61 67 65 3d |n.......|...page=|
|00004600| 24 6d 61 6e 64 69 72 2f | 6d 61 6e 24 73 65 63 74 |$mandir/|man$sect|
|00004610| 69 6f 6e 2f 24 69 0a 09 | 09 09 09 09 09 09 09 65 |ion/$i..|.......e|
|00004620| 6c 73 65 0a 09 09 09 09 | 09 09 09 09 09 65 63 68 |lse.....|.....ech|
|00004630| 6f 20 22 43 61 6e 27 74 | 20 6d 61 6b 65 20 64 69 |o "Can't| make di|
|00004640| 72 65 63 74 6f 72 79 20 | 24 6d 61 6e 64 69 72 2f |rectory |$mandir/|
|00004650| 6d 61 6e 24 73 65 63 74 | 69 6f 6e 20 2d 2d 20 63 |man$sect|ion -- c|
|00004660| 61 6e 27 74 20 6d 6f 76 | 65 20 24 64 65 73 74 2e |an't mov|e $dest.|
|00004670| 22 0a 09 09 09 09 09 09 | 09 09 66 69 0a 09 09 09 |".......|..fi....|
|00004680| 09 09 09 09 65 6c 73 65 | 0a 09 09 09 09 09 09 09 |....else|........|
|00004690| 09 63 70 20 24 69 20 24 | 6d 61 6e 64 69 72 2f 6d |.cp $i $|mandir/m|
|000046a0| 61 6e 24 73 65 63 74 69 | 6f 6e 0a 09 09 09 09 09 |an$secti|on......|
|000046b0| 09 09 09 70 61 67 65 3d | 24 6d 61 6e 64 69 72 2f |...page=|$mandir/|
|000046c0| 6d 61 6e 24 73 65 63 74 | 69 6f 6e 2f 24 69 0a 09 |man$sect|ion/$i..|
|000046d0| 09 09 09 09 09 09 66 69 | 0a 09 09 09 09 09 09 09 |......fi|........|
|000046e0| 3b 3b 0a 09 09 09 09 09 | 65 73 61 63 0a 09 09 09 |;;......|esac....|
|000046f0| 09 09 65 63 68 6f 20 24 | 6e 20 22 5c 6e 4e 72 6f |..echo $|n "\nNro|
|00004700| 66 66 20 69 74 20 74 6f | 20 24 63 61 74 64 69 72 |ff it to| $catdir|
|00004710| 2f 63 61 74 24 7b 73 65 | 63 74 69 6f 6e 7d 3f 20 |/cat${se|ction}? |
|00004720| 5b 79 5d 20 24 63 22 0a | 09 09 09 09 09 72 65 61 |[y] $c".|.....rea|
|00004730| 64 20 61 6e 73 77 65 72 | 0a 09 09 09 09 09 63 61 |d answer|......ca|
|00004740| 73 65 20 22 24 61 6e 73 | 77 65 72 22 20 69 6e 0a |se "$ans|wer" in.|
|00004750| 09 09 09 09 09 09 71 2a | 7c 51 2a 29 0a 09 09 09 |......q*||Q*)....|
|00004760| 09 09 09 09 65 78 69 74 | 20 30 0a 09 09 09 09 09 |....exit| 0......|
|00004770| 09 09 3b 3b 0a 09 09 09 | 09 09 09 6e 2a 7c 4e 2a |..;;....|...n*|N*|
|00004780| 29 0a 09 09 09 09 09 09 | 09 3b 3b 0a 09 09 09 09 |).......|.;;.....|
|00004790| 09 09 2a 29 0a 09 09 09 | 09 09 09 09 69 66 20 5b |..*)....|....if [|
|000047a0| 20 21 20 2d 64 20 24 63 | 61 74 64 69 72 2f 63 61 | ! -d $c|atdir/ca|
|000047b0| 74 24 73 65 63 74 69 6f | 6e 20 5d 0a 09 09 09 09 |t$sectio|n ].....|
|000047c0| 09 09 09 09 74 68 65 6e | 0a 09 09 09 09 09 09 09 |....then|........|
|000047d0| 09 69 66 20 28 6d 6b 64 | 69 72 20 24 63 61 74 64 |.if (mkd|ir $catd|
|000047e0| 69 72 2f 63 61 74 24 73 | 65 63 74 69 6f 6e 20 3e |ir/cat$s|ection >|
|000047f0| 20 2f 64 65 76 2f 6e 75 | 6c 6c 20 32 3e 26 31 29 | /dev/nu|ll 2>&1)|
|00004800| 0a 09 09 09 09 09 09 09 | 09 09 74 68 65 6e 0a 09 |........|..then..|
|00004810| 09 09 09 09 09 09 09 09 | 6e 72 6f 66 66 20 2d 6d |........|nroff -m|
|00004820| 61 6e 20 24 70 61 67 65 | 20 3e 20 24 63 61 74 64 |an $page| > $catd|
|00004830| 69 72 2f 63 61 74 24 73 | 65 63 74 69 6f 6e 2f 24 |ir/cat$s|ection/$|
|00004840| 69 0a 09 09 09 09 09 09 | 09 09 09 24 50 41 47 45 |i.......|...$PAGE|
|00004850| 52 20 24 63 61 74 64 69 | 72 2f 63 61 74 24 73 65 |R $catdi|r/cat$se|
|00004860| 63 74 69 6f 6e 2f 24 69 | 0a 09 09 09 09 09 09 09 |ction/$i|........|
|00004870| 09 65 6c 73 65 0a 09 09 | 09 09 09 09 09 09 09 65 |.else...|.......e|
|00004880| 63 68 6f 20 22 43 61 6e | 27 74 20 6d 61 6b 65 20 |cho "Can|'t make |
|00004890| 64 69 72 65 63 74 6f 72 | 79 20 24 63 61 74 64 69 |director|y $catdi|
|000048a0| 72 2f 63 61 74 24 73 65 | 63 74 69 6f 6e 20 2d 2d |r/cat$se|ction --|
|000048b0| 20 63 61 6e 27 74 20 6e | 72 6f 66 66 20 24 64 65 | can't n|roff $de|
|000048c0| 73 74 2e 22 0a 09 09 09 | 09 09 09 09 09 66 69 0a |st."....|.....fi.|
|000048d0| 09 09 09 09 09 09 09 65 | 6c 73 65 0a 09 09 09 09 |.......e|lse.....|
|000048e0| 09 09 09 09 6e 72 6f 66 | 66 20 2d 6d 61 6e 20 24 |....nrof|f -man $|
|000048f0| 70 61 67 65 20 3e 20 24 | 63 61 74 64 69 72 2f 63 |page > $|catdir/c|
|00004900| 61 74 24 73 65 63 74 69 | 6f 6e 2f 24 69 0a 09 09 |at$secti|on/$i...|
|00004910| 09 09 09 09 09 09 24 50 | 41 47 45 52 20 24 63 61 |......$P|AGER $ca|
|00004920| 74 64 69 72 2f 63 61 74 | 24 73 65 63 74 69 6f 6e |tdir/cat|$section|
|00004930| 2f 24 69 0a 09 09 09 09 | 09 09 09 66 69 0a 09 09 |/$i.....|...fi...|
|00004940| 09 09 09 09 09 3b 3b 0a | 09 09 09 09 09 65 73 61 |.....;;.|.....esa|
|00004950| 63 0a 09 09 09 09 09 3b | 3b 0a 09 09 09 65 73 61 |c......;|;....esa|
|00004960| 63 0a 09 09 64 6f 6e 65 | 0a 0a 09 09 23 20 69 66 |c...done|....# if|
|00004970| 20 22 6d 61 6b 65 66 69 | 6c 65 22 20 65 78 69 73 | "makefi|le" exis|
|00004980| 74 73 2c 20 6d 6f 76 65 | 20 69 74 20 74 6f 20 22 |ts, move| it to "|
|00004990| 4d 61 6b 65 66 69 6c 65 | 22 2c 20 66 6f 72 20 63 |Makefile|", for c|
|000049a0| 6f 6e 73 69 73 74 65 6e | 63 79 0a 0a 09 09 69 66 |onsisten|cy....if|
|000049b0| 20 5b 20 2d 73 20 22 6d | 61 6b 65 66 69 6c 65 22 | [ -s "m|akefile"|
|000049c0| 20 5d 0a 09 09 09 74 68 | 65 6e 0a 09 09 09 63 61 | ]....th|en....ca|
|000049d0| 74 20 6d 61 6b 65 66 69 | 6c 65 20 3e 3e 20 4d 61 |t makefi|le >> Ma|
|000049e0| 6b 65 66 69 6c 65 0a 09 | 09 09 72 6d 20 6d 61 6b |kefile..|..rm mak|
|000049f0| 65 66 69 6c 65 0a 09 09 | 09 65 64 20 2d 20 4d 61 |efile...|.ed - Ma|
|00004a00| 6b 65 66 69 6c 65 20 3c | 3c 20 2b 2b 2b 2b 0a 09 |kefile <|< ++++..|
|00004a10| 09 09 67 2f 6d 61 6b 65 | 66 69 6c 65 2f 73 2f 2f |..g/make|file/s//|
|00004a20| 4d 61 6b 65 66 69 6c 65 | 2f 67 0a 09 09 09 77 0a |Makefile|/g....w.|
|00004a30| 2b 2b 2b 2b 0a 09 09 66 | 69 0a 09 09 69 66 20 5b |++++...f|i...if [|
|00004a40| 20 21 20 2d 73 20 22 4d | 61 6b 65 66 69 6c 65 22 | ! -s "M|akefile"|
|00004a50| 20 5d 0a 09 09 09 74 68 | 65 6e 0a 09 09 09 65 63 | ]....th|en....ec|
|00004a60| 68 6f 20 24 6e 20 22 5c | 6e 47 6f 74 20 61 20 4d |ho $n "\|nGot a M|
|00004a70| 61 6b 65 66 69 6c 65 20 | 73 6f 6d 65 77 68 65 72 |akefile |somewher|
|00004a80| 65 3f 20 5b 6e 5d 20 24 | 63 22 0a 09 09 09 72 65 |e? [n] $|c"....re|
|00004a90| 61 64 20 61 6e 73 77 65 | 72 0a 09 09 09 63 61 73 |ad answe|r....cas|
|00004aa0| 65 20 22 24 61 6e 73 77 | 65 72 22 20 69 6e 0a 09 |e "$answ|er" in..|
|00004ab0| 09 09 09 71 2a 7c 51 2a | 29 0a 09 09 09 09 09 65 |...q*|Q*|)......e|
|00004ac0| 78 69 74 20 30 0a 09 09 | 09 09 09 3b 3b 0a 09 09 |xit 0...|...;;...|
|00004ad0| 09 09 79 2a 7c 79 2a 29 | 0a 09 09 09 09 09 65 63 |..y*|y*)|......ec|
|00004ae0| 68 6f 20 24 6e 20 22 57 | 68 61 74 27 73 20 69 74 |ho $n "W|hat's it|
|00004af0| 20 63 61 6c 6c 65 64 3f | 20 24 63 22 0a 09 09 09 | called?| $c"....|
|00004b00| 09 09 72 65 61 64 20 6e | 61 6d 65 0a 09 09 09 09 |..read n|ame.....|
|00004b10| 09 63 70 20 24 6e 61 6d | 65 20 4d 61 6b 65 66 69 |.cp $nam|e Makefi|
|00004b20| 6c 65 0a 09 09 09 09 09 | 3b 3b 0a 09 09 09 09 2a |le......|;;.....*|
|00004b30| 29 0a 09 09 09 09 09 65 | 63 68 6f 20 24 6e 20 22 |)......e|cho $n "|
|00004b40| 47 65 6e 65 72 61 74 69 | 6e 67 20 62 61 73 69 63 |Generati|ng basic|
|00004b50| 20 4d 61 6b 65 66 69 6c | 65 20 2e 2e 2e 20 24 63 | Makefil|e ... $c|
|00004b60| 22 0a 09 09 09 09 09 65 | 63 68 6f 20 22 23 20 24 |"......e|cho "# $|
|00004b70| 64 65 73 74 20 2d 2d 20 | 24 62 6c 75 72 62 5c 6e |dest -- |$blurb\n|
|00004b80| 22 20 3e 20 4d 61 6b 65 | 66 69 6c 65 0a 09 09 09 |" > Make|file....|
|00004b90| 09 09 65 63 68 6f 20 24 | 6e 20 22 5c 6e 43 46 49 |..echo $|n "\nCFI|
|00004ba0| 4c 45 53 20 3d 09 24 63 | 22 20 3e 3e 20 4d 61 6b |LES =.$c|" >> Mak|
|00004bb0| 65 66 69 6c 65 0a 09 09 | 09 09 09 66 6f 72 20 69 |efile...|...for i|
|00004bc0| 20 69 6e 20 60 6c 73 20 | 2a 2e 63 20 32 3e 20 2f | in `ls |*.c 2> /|
|00004bd0| 64 65 76 2f 6e 75 6c 6c | 60 0a 09 09 09 09 09 09 |dev/null|`.......|
|00004be0| 64 6f 0a 09 09 09 09 09 | 09 65 63 68 6f 20 24 6e |do......|.echo $n|
|00004bf0| 20 22 24 69 20 24 63 22 | 20 3e 3e 20 4d 61 6b 65 | "$i $c"| >> Make|
|00004c00| 66 69 6c 65 0a 09 09 09 | 09 09 64 6f 6e 65 0a 09 |file....|..done..|
|00004c10| 09 09 09 09 65 63 68 6f | 20 24 6e 20 22 5c 6e 5c |....echo| $n "\n\|
|00004c20| 6e 4f 46 49 4c 45 53 20 | 3d 09 24 63 22 20 3e 3e |nOFILES |=.$c" >>|
|00004c30| 20 4d 61 6b 65 66 69 6c | 65 0a 09 09 09 09 09 66 | Makefil|e......f|
|00004c40| 6f 72 20 69 20 69 6e 20 | 60 6c 73 20 2a 2e 63 20 |or i in |`ls *.c |
|00004c50| 32 3e 20 2f 64 65 76 2f | 6e 75 6c 6c 60 0a 09 09 |2> /dev/|null`...|
|00004c60| 09 09 09 09 64 6f 0a 09 | 09 09 09 09 09 65 63 68 |....do..|.....ech|
|00004c70| 6f 20 24 6e 20 22 60 62 | 61 73 65 6e 61 6d 65 20 |o $n "`b|asename |
|00004c80| 24 69 20 2e 63 60 2e 6f | 20 24 63 22 20 3e 3e 20 |$i .c`.o| $c" >> |
|00004c90| 4d 61 6b 65 66 69 6c 65 | 0a 09 09 09 09 09 64 6f |Makefile|......do|
|00004ca0| 6e 65 0a 09 09 09 09 09 | 65 63 68 6f 20 22 5c 6e |ne......|echo "\n|
|00004cb0| 5c 6e 43 46 4c 41 47 53 | 20 3d 09 24 43 46 4c 41 |\nCFLAGS| =.$CFLA|
|00004cc0| 47 53 22 20 3e 3e 20 4d | 61 6b 65 66 69 6c 65 0a |GS" >> M|akefile.|
|00004cd0| 09 09 09 09 09 65 63 68 | 6f 20 22 5c 6e 24 7b 64 |.....ech|o "\n${d|
|00004ce0| 65 73 74 7d 3a 09 5c 24 | 28 4f 46 49 4c 45 53 29 |est}:.\$|(OFILES)|
|00004cf0| 22 20 3e 3e 20 4d 61 6b | 65 66 69 6c 65 0a 09 09 |" >> Mak|efile...|
|00004d00| 09 09 09 65 63 68 6f 20 | 22 09 63 63 20 5c 24 28 |...echo |".cc \$(|
|00004d10| 43 46 4c 41 47 53 29 20 | 5c 24 28 4f 46 49 4c 45 |CFLAGS) |\$(OFILE|
|00004d20| 53 29 20 2d 6f 20 24 64 | 65 73 74 22 20 3e 3e 20 |S) -o $d|est" >> |
|00004d30| 4d 61 6b 65 66 69 6c 65 | 0a 09 09 09 09 09 65 63 |Makefile|......ec|
|00004d40| 68 6f 20 22 5c 6e 63 6c | 65 61 6e 3a 5c 6e 09 72 |ho "\ncl|ean:\n.r|
|00004d50| 6d 20 2d 66 20 2a 2e 6f | 22 20 3e 3e 20 4d 61 6b |m -f *.o|" >> Mak|
|00004d60| 65 66 69 6c 65 0a 0a 09 | 09 09 09 09 65 63 68 6f |efile...|....echo|
|00004d70| 20 22 44 6f 6e 65 2e 22 | 0a 09 09 09 09 09 3b 3b | "Done."|......;;|
|00004d80| 0a 09 09 09 65 73 61 63 | 0a 09 09 66 69 0a 09 09 |....esac|...fi...|
|00004d90| 3b 3b 0a 65 73 61 63 0a | 0a 65 63 68 6f 20 24 6e |;;.esac.|.echo $n|
|00004da0| 20 22 5c 6e 45 64 69 74 | 20 4d 61 6b 65 66 69 6c | "\nEdit| Makefil|
|00004db0| 65 3f 20 5b 79 5d 20 24 | 63 22 0a 72 65 61 64 20 |e? [y] $|c".read |
|00004dc0| 61 6e 73 77 65 72 0a 63 | 61 73 65 20 22 24 61 6e |answer.c|ase "$an|
|00004dd0| 73 77 65 72 22 20 69 6e | 0a 09 71 2a 7c 51 2a 29 |swer" in|..q*|Q*)|
|00004de0| 0a 09 09 65 78 69 74 20 | 30 0a 09 09 3b 3b 0a 09 |...exit |0...;;..|
|00004df0| 6e 2a 7c 4e 2a 29 0a 09 | 09 3b 3b 0a 09 2a 29 0a |n*|N*)..|.;;..*).|
|00004e00| 09 09 74 72 61 70 20 27 | 27 20 32 20 33 0a 09 09 |..trap '|' 2 3...|
|00004e10| 28 24 56 49 53 55 41 4c | 20 4d 61 6b 65 66 69 6c |($VISUAL| Makefil|
|00004e20| 65 29 0a 09 09 74 72 61 | 70 20 33 0a 09 09 3b 3b |e)...tra|p 3...;;|
|00004e30| 0a 65 73 61 63 0a 0a 23 | 20 63 72 65 61 74 65 20 |.esac..#| create |
|00004e40| 62 61 73 69 63 20 4e 4f | 54 45 53 20 65 6e 74 72 |basic NO|TES entr|
|00004e50| 79 20 66 6f 72 20 69 74 | 0a 0a 65 63 68 6f 20 24 |y for it|..echo $|
|00004e60| 6e 20 22 5c 6e 43 72 65 | 61 74 65 20 62 61 73 69 |n "\nCre|ate basi|
|00004e70| 63 20 4e 4f 54 45 53 20 | 65 6e 74 72 79 3f 20 5b |c NOTES |entry? [|
|00004e80| 79 5d 20 24 63 22 0a 72 | 65 61 64 20 61 6e 73 77 |y] $c".r|ead answ|
|00004e90| 65 72 0a 63 61 73 65 20 | 22 24 61 6e 73 77 65 72 |er.case |"$answer|
|00004ea0| 22 20 69 6e 0a 09 71 2a | 7c 51 2a 29 0a 09 09 65 |" in..q*||Q*)...e|
|00004eb0| 78 69 74 20 30 0a 09 09 | 3b 3b 0a 09 6e 2a 7c 4e |xit 0...|;;..n*|N|
|00004ec0| 2a 29 0a 09 09 3b 3b 0a | 09 2a 29 0a 09 09 65 63 |*)...;;.|.*)...ec|
|00004ed0| 68 6f 20 22 60 62 61 73 | 65 6e 61 6d 65 20 24 64 |ho "`bas|ename $d|
|00004ee0| 65 73 74 20 2e 63 60 3a | 09 5b 24 64 61 74 65 5d |est .c`:|.[$date]|
|00004ef0| 20 24 7b 62 6c 75 72 62 | 7d 22 20 3e 3e 20 4e 4f | ${blurb|}" >> NO|
|00004f00| 54 45 53 0a 09 09 63 61 | 73 65 20 22 24 70 6f 73 |TES...ca|se "$pos|
|00004f10| 74 65 72 22 20 69 6e 0a | 09 09 09 22 22 29 09 09 |ter" in.|..."")..|
|00004f20| 09 09 09 09 23 20 6e 6f | 74 20 61 20 6e 65 74 20 |....# no|t a net |
|00004f30| 61 72 74 69 63 6c 65 0a | 09 09 09 09 3b 3b 0a 09 |article.|....;;..|
|00004f40| 09 09 2a 29 0a 09 09 09 | 09 65 63 68 6f 20 22 09 |..*)....|.echo ".|
|00004f50| 24 70 6f 73 74 65 72 22 | 20 3e 3e 20 4e 4f 54 45 |$poster"| >> NOTE|
|00004f60| 53 0a 09 09 09 09 65 63 | 68 6f 20 22 09 24 70 61 |S.....ec|ho ".$pa|
|00004f70| 74 68 22 20 3e 3e 20 4e | 4f 54 45 53 0a 09 09 09 |th" >> N|OTES....|
|00004f80| 09 3b 3b 0a 09 09 65 73 | 61 63 0a 09 09 65 63 68 |.;;...es|ac...ech|
|00004f90| 6f 20 22 22 20 3e 3e 20 | 4e 4f 54 45 53 0a 09 09 |o "" >> |NOTES...|
|00004fa0| 3b 3b 0a 65 73 61 63 0a | 0a 65 63 68 6f 20 24 6e |;;.esac.|.echo $n|
|00004fb0| 20 22 5c 6e 43 6f 6d 70 | 69 6c 65 20 24 7b 64 65 | "\nComp|ile ${de|
|00004fc0| 73 74 7d 3f 20 5b 79 5d | 20 24 63 22 0a 72 65 61 |st}? [y]| $c".rea|
|00004fd0| 64 20 61 6e 73 77 65 72 | 0a 63 61 73 65 20 22 24 |d answer|.case "$|
|00004fe0| 61 6e 73 77 65 72 22 20 | 69 6e 0a 09 71 2a 7c 51 |answer" |in..q*|Q|
|00004ff0| 2a 29 0a 09 09 65 78 69 | 74 20 30 0a 09 09 3b 3b |*)...exi|t 0...;;|
|00005000| 0a 09 6e 2a 7c 4e 2a 29 | 0a 09 09 3b 3b 0a 09 2a |..n*|N*)|...;;..*|
|00005010| 29 0a 09 09 6d 61 6b 65 | 20 24 62 6e 61 6d 65 0a |)...make| $bname.|
|00005020| 09 09 3b 3b 0a 65 73 61 | 63 0a 65 63 68 6f 20 24 |..;;.esa|c.echo $|
|00005030| 6e 20 22 5c 6e 57 61 6e | 74 20 61 20 73 68 65 6c |n "\nWan|t a shel|
|00005040| 6c 3f 20 5b 79 5d 20 24 | 63 22 0a 72 65 61 64 20 |l? [y] $|c".read |
|00005050| 61 6e 73 77 65 72 0a 63 | 61 73 65 20 22 24 61 6e |answer.c|ase "$an|
|00005060| 73 77 65 72 22 20 69 6e | 0a 09 71 2a 7c 51 2a 29 |swer" in|..q*|Q*)|
|00005070| 0a 09 09 65 78 69 74 20 | 30 0a 09 09 3b 3b 0a 09 |...exit |0...;;..|
|00005080| 6e 2a 7c 4e 2a 29 0a 09 | 09 3b 3b 0a 09 2a 29 0a |n*|N*)..|.;;..*).|
|00005090| 09 09 74 72 61 70 20 27 | 27 20 32 20 33 0a 09 09 |..trap '|' 2 3...|
|000050a0| 28 24 53 48 45 4c 4c 29 | 0a 09 09 74 72 61 70 20 |($SHELL)|...trap |
|000050b0| 33 0a 09 09 3b 3b 0a 65 | 73 61 63 0a 65 63 68 6f |3...;;.e|sac.echo|
|000050c0| 20 24 6e 20 22 5c 6e 41 | 6e 79 20 4e 4f 54 45 53 | $n "\nA|ny NOTES|
|000050d0| 3f 20 5b 79 5d 20 24 63 | 22 0a 72 65 61 64 20 61 |? [y] $c|".read a|
|000050e0| 6e 73 77 65 72 0a 63 61 | 73 65 20 22 24 61 6e 73 |nswer.ca|se "$ans|
|000050f0| 77 65 72 22 20 69 6e 0a | 09 71 2a 7c 51 2a 29 0a |wer" in.|.q*|Q*).|
|00005100| 09 09 65 78 69 74 20 30 | 0a 09 09 3b 3b 0a 09 6e |..exit 0|...;;..n|
|00005110| 2a 7c 4e 2a 29 0a 09 09 | 3b 3b 0a 09 2a 29 0a 09 |*|N*)...|;;..*)..|
|00005120| 09 6e 6f 74 65 0a 09 09 | 3b 3b 0a 65 73 61 63 0a |.note...|;;.esac.|
|00005130| 53 48 41 52 5f 45 4f 46 | 0a 69 66 20 74 65 73 74 |SHAR_EOF|.if test|
|00005140| 20 31 34 32 36 38 20 2d | 6e 65 20 22 60 77 63 20 | 14268 -|ne "`wc |
|00005150| 2d 63 20 3c 20 27 73 61 | 76 65 73 72 63 27 60 22 |-c < 'sa|vesrc'`"|
|00005160| 0a 74 68 65 6e 0a 09 65 | 63 68 6f 20 73 68 61 72 |.then..e|cho shar|
|00005170| 3a 20 65 72 72 6f 72 20 | 74 72 61 6e 73 6d 69 74 |: error |transmit|
|00005180| 74 69 6e 67 20 22 27 73 | 61 76 65 73 72 63 27 22 |ting "'s|avesrc'"|
|00005190| 20 27 28 73 68 6f 75 6c | 64 20 68 61 76 65 20 62 | '(shoul|d have b|
|000051a0| 65 65 6e 20 31 34 32 36 | 38 20 63 68 61 72 61 63 |een 1426|8 charac|
|000051b0| 74 65 72 73 29 27 0a 66 | 69 0a 66 69 0a 65 63 68 |ters)'.f|i.fi.ech|
|000051c0| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|000051d0| 6e 67 20 22 27 73 61 76 | 65 73 72 63 2e 31 27 22 |ng "'sav|esrc.1'"|
|000051e0| 20 27 28 31 32 30 34 34 | 20 63 68 61 72 61 63 74 | '(12044| charact|
|000051f0| 65 72 73 29 27 0a 69 66 | 20 74 65 73 74 20 2d 66 |ers)'.if| test -f|
|00005200| 20 27 73 61 76 65 73 72 | 63 2e 31 27 0a 74 68 65 | 'savesr|c.1'.the|
|00005210| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 77 69 |n..echo |shar: wi|
|00005220| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00005230| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00005240| 22 27 73 61 76 65 73 72 | 63 2e 31 27 22 0a 65 6c |"'savesr|c.1'".el|
|00005250| 73 65 0a 73 65 64 20 27 | 73 2f 5e 58 2f 2f 27 20 |se.sed '|s/^X//' |
|00005260| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00005270| 73 61 76 65 73 72 63 2e | 31 27 0a 2e 6c 73 20 31 |savesrc.|1'..ls 1|
|00005280| 0a 2e 76 73 20 31 31 2e | 35 0a 2e 54 48 20 53 41 |..vs 11.|5..TH SA|
|00005290| 56 45 53 52 43 20 31 20 | 4c 4f 43 41 4c 0a 2e 53 |VESRC 1 |LOCAL..S|
|000052a0| 48 20 4e 41 4d 45 0a 73 | 61 76 65 73 72 63 20 5c |H NAME.s|avesrc \|
|000052b0| 2d 20 6f 72 67 61 6e 69 | 7a 65 20 70 72 6f 67 72 |- organi|ze progr|
|000052c0| 61 6d 20 73 6f 75 72 63 | 65 73 20 66 72 6f 6d 20 |am sourc|es from |
|000052d0| 55 73 65 6e 65 74 0a 2e | 53 48 20 53 59 4e 4f 50 |Usenet..|SH SYNOP|
|000052e0| 53 49 53 0a 5c 66 42 73 | 61 76 65 73 72 63 5c 66 |SIS.\fBs|avesrc\f|
|000052f0| 52 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 5b 73 |R destin|ation [s|
|00005300| 6f 75 72 63 65 20 66 69 | 6c 65 20 2e 2e 2e 5d 0a |ource fi|le ...].|
|00005310| 2e 53 48 20 44 45 53 43 | 52 49 50 54 49 4f 4e 0a |.SH DESC|RIPTION.|
|00005320| 5c 66 49 53 61 76 65 73 | 72 63 5c 66 52 20 69 73 |\fISaves|rc\fR is|
|00005330| 20 61 20 73 68 65 6c 6c | 20 70 72 6f 67 72 61 6d | a shell| program|
|00005340| 20 64 65 73 69 67 6e 65 | 64 20 74 6f 20 73 69 6d | designe|d to sim|
|00005350| 70 6c 69 66 79 20 74 68 | 65 20 72 65 74 72 69 65 |plify th|e retrie|
|00005360| 76 61 6c 2c 0a 74 65 73 | 74 69 6e 67 2c 20 64 6f |val,.tes|ting, do|
|00005370| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 2c 0a 61 6e 64 |cumentat|ion,.and|
|00005380| 20 73 74 6f 72 61 67 65 | 20 6f 66 20 70 72 6f 67 | storage| of prog|
|00005390| 72 61 6d 20 73 6f 75 72 | 63 65 73 20 66 72 6f 6d |ram sour|ces from|
|000053a0| 20 74 68 65 20 55 73 65 | 6e 65 74 20 6e 65 77 73 | the Use|net news|
|000053b0| 20 6e 65 74 77 6f 72 6b | 2c 20 61 6c 74 68 6f 75 | network|, althou|
|000053c0| 67 68 20 69 74 0a 63 61 | 6e 20 62 65 20 75 73 65 |gh it.ca|n be use|
|000053d0| 64 20 77 69 74 68 20 61 | 6e 79 20 73 6f 75 72 63 |d with a|ny sourc|
|000053e0| 65 20 66 69 6c 65 73 2e | 0a 2e 73 70 20 30 2e 31 |e files.|..sp 0.1|
|000053f0| 33 69 0a 5c 66 49 53 61 | 76 65 73 72 63 5c 66 52 |3i.\fISa|vesrc\fR|
|00005400| 20 77 69 6c 6c 20 72 65 | 61 64 20 73 74 61 6e 64 | will re|ad stand|
|00005410| 61 72 64 20 69 6e 70 75 | 74 20 69 66 20 6e 6f 20 |ard inpu|t if no |
|00005420| 73 6f 75 72 63 65 20 66 | 69 6c 65 73 20 61 72 65 |source f|iles are|
|00005430| 20 67 69 76 65 6e 2c 20 | 73 6f 0a 61 20 6e 65 77 | given, |so.a new|
|00005440| 73 20 61 72 74 69 63 6c | 65 20 6d 61 79 20 62 65 |s articl|e may be|
|00005450| 20 70 69 70 65 64 20 74 | 6f 20 69 74 20 63 6f 6e | piped t|o it con|
|00005460| 76 65 6e 69 65 6e 74 6c | 79 20 66 72 6f 6d 20 6e |venientl|y from n|
|00005470| 65 77 73 72 65 61 64 65 | 72 73 20 77 69 74 68 20 |ewsreade|rs with |
|00005480| 74 68 69 73 0a 66 61 63 | 69 6c 69 74 79 2c 20 73 |this.fac|ility, s|
|00005490| 75 63 68 20 61 73 20 5c | 66 49 72 6e 28 31 29 5c |uch as \|fIrn(1)\|
|000054a0| 66 52 2e 0a 54 68 69 73 | 20 6d 61 6b 65 73 20 69 |fR..This| makes i|
|000054b0| 74 20 6d 75 63 68 20 65 | 61 73 69 65 72 20 74 6f |t much e|asier to|
|000054c0| 20 73 61 76 65 20 73 6f | 75 72 63 65 73 20 69 6e | save so|urces in|
|000054d0| 20 61 20 73 74 61 6e 64 | 61 72 64 20 6d 61 6e 6e | a stand|ard mann|
|000054e0| 65 72 0a 61 6e 64 20 74 | 65 73 74 20 74 68 65 6d |er.and t|est them|
|000054f0| 20 6f 75 74 20 77 68 69 | 6c 65 20 61 63 74 75 61 | out whi|le actua|
|00005500| 6c 6c 79 20 72 65 61 64 | 69 6e 67 20 6e 65 77 73 |lly read|ing news|
|00005510| 2c 20 72 61 74 68 65 72 | 20 74 68 61 6e 20 61 63 |, rather| than ac|
|00005520| 63 75 6d 75 6c 61 74 69 | 6e 67 0a 6d 65 73 73 79 |cumulati|ng.messy|
|00005530| 20 64 69 72 65 63 74 6f | 72 69 65 73 20 6f 66 20 | directo|ries of |
|00005540| 6d 69 73 63 65 6c 6c 61 | 6e 65 6f 75 73 20 73 6f |miscella|neous so|
|00005550| 75 72 63 65 73 20 74 6f | 20 62 65 20 6f 72 67 61 |urces to| be orga|
|00005560| 6e 69 7a 65 64 20 52 65 | 61 6c 20 53 6f 6f 6e 20 |nized Re|al Soon |
|00005570| 4e 6f 77 2e 0a 2e 73 70 | 20 30 2e 31 33 69 0a 42 |Now...sp| 0.13i.B|
|00005580| 61 73 69 63 61 6c 6c 79 | 2c 20 5c 66 49 73 61 76 |asically|, \fIsav|
|00005590| 65 73 72 63 5c 66 52 20 | 77 69 6c 6c 20 74 61 6b |esrc\fR |will tak|
|000055a0| 65 20 61 20 73 69 6e 67 | 6c 65 20 70 72 6f 67 72 |e a sing|le progr|
|000055b0| 61 6d 20 73 6f 75 72 63 | 65 20 66 69 6c 65 20 6f |am sourc|e file o|
|000055c0| 72 20 61 0a 73 68 65 6c | 6c 20 61 72 63 68 69 76 |r a.shel|l archiv|
|000055d0| 65 2c 20 70 6c 61 63 65 | 20 69 74 20 69 6e 20 61 |e, place| it in a|
|000055e0| 20 64 65 73 69 67 6e 61 | 74 65 64 20 73 6f 75 72 | designa|ted sour|
|000055f0| 63 65 20 64 69 72 65 63 | 74 6f 72 79 20 6f 72 20 |ce direc|tory or |
|00005600| 73 75 62 2d 64 69 72 65 | 63 74 6f 72 79 0a 74 68 |sub-dire|ctory.th|
|00005610| 65 72 65 6f 66 2c 20 75 | 6e 73 68 61 72 20 69 74 |ereof, u|nshar it|
|00005620| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 2c 20 67 | if nece|ssary, g|
|00005630| 65 6e 65 72 61 74 65 20 | 61 20 4d 61 6b 65 66 69 |enerate |a Makefi|
|00005640| 6c 65 20 65 6e 74 72 79 | 20 69 66 20 6e 65 63 65 |le entry| if nece|
|00005650| 73 73 61 72 79 2c 0a 70 | 72 6f 6d 70 74 20 66 6f |ssary,.p|rompt fo|
|00005660| 72 20 61 20 68 61 6c 66 | 2d 6c 69 6e 65 20 64 65 |r a half|-line de|
|00005670| 73 63 72 69 70 74 69 6f | 6e 20 6f 66 20 77 68 61 |scriptio|n of wha|
|00005680| 74 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 64 6f |t the pr|ogram do|
|00005690| 65 73 2c 20 61 74 74 65 | 6d 70 74 0a 74 6f 20 63 |es, atte|mpt.to c|
|000056a0| 6f 6d 70 69 6c 65 20 69 | 74 2c 20 67 69 76 65 20 |ompile i|t, give |
|000056b0| 74 68 65 20 75 73 65 72 | 20 61 20 73 68 65 6c 6c |the user| a shell|
|000056c0| 20 74 6f 20 74 77 69 64 | 64 6c 65 20 69 74 20 77 | to twid|dle it w|
|000056d0| 68 65 6e 20 69 74 20 64 | 6f 65 73 6e 27 74 0a 77 |hen it d|oesn't.w|
|000056e0| 6f 72 6b 2c 20 61 6e 64 | 20 61 64 64 20 65 6e 74 |ork, and| add ent|
|000056f0| 72 69 65 73 20 74 6f 20 | 61 20 66 69 6c 65 20 6f |ries to |a file o|
|00005700| 66 20 6e 6f 74 65 73 20 | 69 6e 64 69 63 61 74 69 |f notes |indicati|
|00005710| 6e 67 20 77 68 61 74 20 | 69 74 20 69 73 2c 20 77 |ng what |it is, w|
|00005720| 68 65 72 65 0a 61 6e 64 | 20 77 68 6f 20 69 74 20 |here.and| who it |
|00005730| 63 61 6d 65 20 66 72 6f | 6d 2c 20 77 68 65 6e 20 |came fro|m, when |
|00005740| 69 74 20 61 72 72 69 76 | 65 64 2c 20 61 6e 64 20 |it arriv|ed, and |
|00005750| 77 68 65 74 68 65 72 20 | 6f 72 20 6e 6f 74 20 69 |whether |or not i|
|00005760| 74 20 77 6f 72 6b 73 2e | 0a 49 74 20 77 69 6c 6c |t works.|.It will|
|00005770| 20 61 6c 73 6f 20 64 65 | 61 6c 20 73 65 6e 73 69 | also de|al sensi|
|00005780| 62 6c 79 20 77 69 74 68 | 20 68 65 61 64 65 72 20 |bly with| header |
|00005790| 66 69 6c 65 73 20 61 6e | 64 20 6d 61 6e 75 61 6c |files an|d manual|
|000057a0| 20 70 61 67 65 73 2e 0a | 2e 73 70 20 30 2e 31 33 | pages..|.sp 0.13|
|000057b0| 69 0a 5c 66 49 53 61 76 | 65 73 72 63 5c 66 52 20 |i.\fISav|esrc\fR |
|000057c0| 69 73 20 69 6e 74 65 72 | 61 63 74 69 76 65 2e 0a |is inter|active..|
|000057d0| 49 74 20 6d 61 79 20 62 | 65 20 74 65 72 6d 69 6e |It may b|e termin|
|000057e0| 61 74 65 64 20 62 79 20 | 74 79 70 69 6e 67 20 60 |ated by |typing `|
|000057f0| 60 71 27 27 20 69 6e 20 | 72 65 73 70 6f 6e 73 65 |`q'' in |response|
|00005800| 20 74 6f 20 61 6e 79 20 | 71 75 65 73 74 69 6f 6e | to any |question|
|00005810| 2c 20 62 75 74 0a 63 61 | 6e 6e 6f 74 20 62 65 20 |, but.ca|nnot be |
|00005820| 61 62 6f 72 74 65 64 20 | 77 69 74 68 20 61 6e 20 |aborted |with an |
|00005830| 69 6e 74 65 72 72 75 70 | 74 2e 0a 49 66 20 70 61 |interrup|t..If pa|
|00005840| 6e 69 63 20 73 74 69 6b | 65 73 2c 20 5c 66 49 71 |nic stik|es, \fIq|
|00005850| 75 69 74 5c 66 52 20 28 | 6e 6f 72 6d 61 6c 6c 79 |uit\fR (|normally|
|00005860| 20 43 54 52 4c 2d 5c 65 | 29 20 77 69 6c 6c 20 70 | CTRL-\e|) will p|
|00005870| 72 6f 64 75 63 65 20 61 | 20 67 72 61 63 65 66 75 |roduce a| gracefu|
|00005880| 6c 20 65 78 69 74 2e 0a | 2e 73 70 20 30 2e 32 69 |l exit..|.sp 0.2i|
|00005890| 0a 5c 66 42 44 69 72 65 | 63 74 6f 72 79 20 53 74 |.\fBDire|ctory St|
|000058a0| 72 75 63 74 75 72 65 73 | 20 45 74 63 2e 5c 66 52 |ructures| Etc.\fR|
|000058b0| 0a 2e 73 70 20 30 2e 31 | 33 69 0a 5c 66 49 53 61 |..sp 0.1|3i.\fISa|
|000058c0| 76 65 73 72 63 5c 66 52 | 20 61 73 73 75 6d 65 73 |vesrc\fR| assumes|
|000058d0| 20 74 68 61 74 20 61 6c | 6c 20 73 6f 75 72 63 65 | that al|l source|
|000058e0| 73 20 77 69 6c 6c 20 62 | 65 20 70 6c 61 63 65 64 |s will b|e placed|
|000058f0| 20 69 6e 20 61 20 5c 66 | 49 6d 61 69 6e 0a 73 6f | in a \f|Imain.so|
|00005900| 75 72 63 65 73 20 64 69 | 72 65 63 74 6f 72 79 5c |urces di|rectory\|
|00005910| 66 52 2c 20 6f 72 20 69 | 6e 20 73 75 62 2d 64 69 |fR, or i|n sub-di|
|00005920| 72 65 63 74 6f 72 69 65 | 73 20 75 6e 64 65 72 20 |rectorie|s under |
|00005930| 69 74 2e 0a 49 74 20 77 | 69 6c 6c 20 6c 6f 6f 6b |it..It w|ill look|
|00005940| 20 66 6f 72 20 61 6e 20 | 65 6e 76 69 72 6f 6e 6d | for an |environm|
|00005950| 65 6e 74 20 76 61 72 69 | 61 62 6c 65 20 60 60 73 |ent vari|able ``s|
|00005960| 72 63 64 69 72 27 27 20 | 67 69 76 69 6e 67 20 74 |rcdir'' |giving t|
|00005970| 68 65 0a 66 75 6c 6c 20 | 70 61 74 68 6e 61 6d 65 |he.full |pathname|
|00005980| 20 6f 66 20 74 68 69 73 | 20 64 69 72 65 63 74 6f | of this| directo|
|00005990| 72 79 3b 20 20 74 68 65 | 20 64 65 66 61 75 6c 74 |ry; the| default|
|000059a0| 20 76 61 6c 75 65 20 69 | 73 20 60 60 24 48 4f 4d | value i|s ``$HOM|
|000059b0| 45 2f 73 72 63 27 27 2e | 0a 2e 73 70 20 30 2e 31 |E/src''.|..sp 0.1|
|000059c0| 33 69 0a 4d 61 6e 75 61 | 6c 20 70 61 67 65 20 73 |3i.Manua|l page s|
|000059d0| 6f 75 72 63 65 73 20 61 | 72 65 20 61 73 73 75 6d |ources a|re assum|
|000059e0| 65 64 20 74 6f 20 6c 69 | 76 65 20 69 6e 20 61 20 |ed to li|ve in a |
|000059f0| 64 69 72 65 63 74 6f 72 | 79 20 77 69 74 68 0a 73 |director|y with.s|
|00005a00| 75 62 64 69 72 65 63 74 | 6f 72 69 65 73 20 6e 61 |ubdirect|ories na|
|00005a10| 6d 65 64 20 60 60 6d 61 | 6e 31 27 27 20 74 68 72 |med ``ma|n1'' thr|
|00005a20| 6f 75 67 68 20 60 60 6d | 61 6e 38 27 27 2c 20 61 |ough ``m|an8'', a|
|00005a30| 6e 64 20 6d 61 6e 75 61 | 6c 20 70 61 67 65 73 0a |nd manua|l pages.|
|00005a40| 77 68 69 63 68 20 68 61 | 76 65 20 62 65 65 6e 20 |which ha|ve been |
|00005a50| 66 6f 72 6d 61 74 74 65 | 64 20 75 73 69 6e 67 20 |formatte|d using |
|00005a60| 5c 66 49 6e 72 6f 66 66 | 20 2d 6d 61 6e 5c 66 52 |\fInroff| -man\fR|
|00005a70| 20 61 72 65 20 61 73 73 | 75 6d 65 64 20 74 6f 20 | are ass|umed to |
|00005a80| 6c 69 76 65 20 69 6e 20 | 61 0a 64 69 72 65 63 74 |live in |a.direct|
|00005a90| 6f 72 79 20 77 69 74 68 | 20 73 75 62 64 69 72 65 |ory with| subdire|
|00005aa0| 63 74 6f 72 69 65 73 20 | 6e 61 6d 65 64 20 60 60 |ctories |named ``|
|00005ab0| 63 61 74 31 27 27 20 74 | 68 72 6f 75 67 68 20 60 |cat1'' t|hrough `|
|00005ac0| 60 63 61 74 38 27 27 2e | 0a 5c 66 49 53 61 76 65 |`cat8''.|.\fISave|
|00005ad0| 73 72 63 5c 66 52 20 6c | 6f 6f 6b 73 20 66 6f 72 |src\fR l|ooks for|
|00005ae0| 20 74 77 6f 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 | two env|ironment|
|00005af0| 20 76 61 72 69 61 62 6c | 65 73 2c 20 60 60 6d 61 | variabl|es, ``ma|
|00005b00| 6e 64 69 72 27 27 0a 61 | 6e 64 20 60 60 63 61 74 |ndir''.a|nd ``cat|
|00005b10| 64 69 72 27 27 2c 20 77 | 68 69 63 68 20 67 69 76 |dir'', w|hich giv|
|00005b20| 65 20 74 68 65 20 66 75 | 6c 6c 20 70 61 74 68 6e |e the fu|ll pathn|
|00005b30| 61 6d 65 73 20 6f 66 20 | 74 68 65 73 65 20 64 69 |ames of |these di|
|00005b40| 72 65 63 74 6f 72 69 65 | 73 2e 0a 60 60 4d 61 6e |rectorie|s..``Man|
|00005b50| 64 69 72 27 27 20 61 6e | 64 20 60 60 63 61 74 64 |dir'' an|d ``catd|
|00005b60| 69 72 27 27 20 6d 61 79 | 20 62 65 20 74 68 65 20 |ir'' may| be the |
|00005b70| 73 61 6d 65 3b 20 20 74 | 68 65 20 64 65 66 61 75 |same; t|he defau|
|00005b80| 6c 74 20 76 61 6c 75 65 | 20 66 6f 72 20 65 61 63 |lt value| for eac|
|00005b90| 68 0a 69 73 20 60 60 24 | 48 4f 4d 45 2f 6d 61 6e |h.is ``$|HOME/man|
|00005ba0| 27 27 2e 0a 2e 73 70 20 | 30 2e 31 33 69 0a 5c 66 |''...sp |0.13i.\f|
|00005bb0| 49 53 61 76 65 73 72 63 | 5c 66 52 20 66 75 72 74 |ISavesrc|\fR furt|
|00005bc0| 68 65 72 20 61 73 73 75 | 6d 65 73 20 74 68 61 74 |her assu|mes that|
|00005bd0| 20 74 68 65 72 65 20 77 | 69 6c 6c 20 62 65 20 61 | there w|ill be a|
|00005be0| 20 4d 61 6b 65 66 69 6c | 65 20 69 6e 20 74 68 65 | Makefil|e in the|
|00005bf0| 20 6d 61 69 6e 20 73 6f | 75 72 63 65 73 0a 64 69 | main so|urces.di|
|00005c00| 72 65 63 74 6f 72 79 3b | 20 20 6f 6e 65 20 77 69 |rectory;| one wi|
|00005c10| 6c 6c 20 62 65 20 63 72 | 65 61 74 65 64 20 69 66 |ll be cr|eated if|
|00005c20| 20 69 74 20 64 6f 65 73 | 20 6e 6f 74 20 65 78 69 | it does| not exi|
|00005c30| 73 74 2e 0a 49 6e 63 69 | 64 65 6e 74 61 6c 6c 79 |st..Inci|dentally|
|00005c40| 2c 20 69 66 20 61 20 60 | 60 6d 61 6b 65 66 69 6c |, if a `|`makefil|
|00005c50| 65 27 27 20 69 73 20 66 | 6f 75 6e 64 20 61 6e 79 |e'' is f|ound any|
|00005c60| 77 68 65 72 65 2c 20 69 | 74 20 69 73 20 61 70 70 |where, i|t is app|
|00005c70| 65 6e 64 65 64 20 74 6f | 0a 60 60 4d 61 6b 65 66 |ended to|.``Makef|
|00005c80| 69 6c 65 27 27 20 61 6e | 64 20 74 68 65 6e 20 72 |ile'' an|d then r|
|00005c90| 65 6d 6f 76 65 64 2c 20 | 69 6e 20 74 68 65 20 69 |emoved, |in the i|
|00005ca0| 6e 74 65 72 65 73 74 73 | 20 6f 66 20 63 6f 6e 73 |nterests| of cons|
|00005cb0| 69 73 74 65 6e 63 79 2e | 0a 28 54 68 65 20 4d 61 |istency.|.(The Ma|
|00005cc0| 6b 65 66 69 6c 65 20 69 | 73 20 74 68 65 6e 20 65 |kefile i|s then e|
|00005cd0| 64 69 74 65 64 20 74 6f | 20 63 68 61 6e 67 65 20 |dited to| change |
|00005ce0| 61 6c 6c 20 72 65 66 65 | 72 65 6e 63 65 73 20 74 |all refe|rences t|
|00005cf0| 6f 20 60 60 6d 61 6b 65 | 66 69 6c 65 27 27 0a 69 |o ``make|file''.i|
|00005d00| 6e 74 6f 20 60 60 4d 61 | 6b 65 66 69 6c 65 27 27 |nto ``Ma|kefile''|
|00005d10| 2e 29 0a 2e 73 70 20 30 | 2e 31 33 69 0a 41 20 66 |.)..sp 0|.13i.A f|
|00005d20| 69 6c 65 20 63 61 6c 6c | 65 64 20 60 60 4e 4f 54 |ile call|ed ``NOT|
|00005d30| 45 53 27 27 20 69 73 20 | 61 6c 73 6f 20 65 78 70 |ES'' is |also exp|
|00005d40| 65 63 74 65 64 20 69 6e | 20 61 6e 79 20 73 6f 75 |ected in| any sou|
|00005d50| 72 63 65 20 64 69 72 65 | 63 74 6f 72 79 2c 20 61 |rce dire|ctory, a|
|00005d60| 6e 64 0a 77 69 6c 6c 20 | 62 65 20 63 72 65 61 74 |nd.will |be creat|
|00005d70| 65 64 20 69 66 20 69 74 | 20 64 6f 65 73 20 6e 6f |ed if it| does no|
|00005d80| 74 20 65 78 69 73 74 2e | 0a 54 68 69 73 20 66 69 |t exist.|.This fi|
|00005d90| 6c 65 20 63 6f 6e 74 61 | 69 6e 73 20 73 68 6f 72 |le conta|ins shor|
|00005da0| 74 20 6e 6f 74 65 73 20 | 6f 6e 20 77 68 61 74 20 |t notes |on what |
|00005db0| 74 68 65 20 70 72 6f 67 | 72 61 6d 73 20 69 6e 20 |the prog|rams in |
|00005dc0| 74 68 65 20 64 69 72 65 | 63 74 6f 72 79 0a 64 6f |the dire|ctory.do|
|00005dd0| 2c 20 77 68 65 72 65 20 | 61 6e 64 20 77 68 6f 6d |, where |and whom|
|00005de0| 20 74 68 65 79 20 63 61 | 6d 65 20 66 72 6f 6d 20 | they ca|me from |
|00005df0| 28 69 66 20 6b 6e 6f 77 | 6e 29 2c 20 77 68 65 6e |(if know|n), when|
|00005e00| 20 74 68 65 79 20 77 65 | 72 65 20 72 65 63 65 69 | they we|re recei|
|00005e10| 76 65 64 2c 0a 61 6e 64 | 20 61 6e 79 20 6f 74 68 |ved,.and| any oth|
|00005e20| 65 72 20 72 65 6c 65 76 | 61 6e 74 20 69 6e 66 6f |er relev|ant info|
|00005e30| 72 6d 61 74 69 6f 6e 20 | 28 73 75 63 68 20 61 73 |rmation |(such as|
|00005e40| 20 69 66 20 74 68 65 79 | 20 77 6f 72 6b 20 61 6e | if they| work an|
|00005e50| 64 20 61 63 74 75 61 6c | 6c 79 0a 73 65 65 6d 20 |d actual|ly.seem |
|00005e60| 74 6f 20 62 65 20 75 73 | 65 66 75 6c 29 2e 0a 5c |to be us|eful)..\|
|00005e70| 66 49 53 61 76 65 73 72 | 63 5c 66 52 20 77 69 6c |fISavesr|c\fR wil|
|00005e80| 6c 20 63 72 65 61 74 65 | 20 61 20 62 61 73 69 63 |l create| a basic|
|00005e90| 20 4e 4f 54 45 53 20 65 | 6e 74 72 79 20 66 6f 72 | NOTES e|ntry for|
|00005ea0| 20 61 6e 79 20 70 72 6f | 67 72 61 6d 20 69 74 20 | any pro|gram it |
|00005eb0| 64 65 61 6c 73 0a 77 69 | 74 68 20 69 66 20 74 68 |deals.wi|th if th|
|00005ec0| 65 20 75 73 65 72 20 73 | 6f 20 64 65 73 69 72 65 |e user s|o desire|
|00005ed0| 73 2e 0a 54 68 65 20 4e | 4f 54 45 53 20 66 69 6c |s..The N|OTES fil|
|00005ee0| 65 20 69 73 20 69 6e 74 | 65 6e 64 65 64 20 74 6f |e is int|ended to|
|00005ef0| 20 62 65 20 6d 61 6e 69 | 70 75 6c 61 74 65 64 20 | be mani|pulated |
|00005f00| 62 79 20 61 20 61 6e 6f | 74 68 65 72 20 70 72 6f |by a ano|ther pro|
|00005f10| 67 72 61 6d 2c 0a 5c 66 | 49 6e 6f 74 65 28 31 4c |gram,.\f|Inote(1L|
|00005f20| 29 5c 66 52 2c 20 62 75 | 74 20 73 69 6e 63 65 20 |)\fR, bu|t since |
|00005f30| 69 74 20 69 73 20 61 20 | 6f 72 64 69 6e 61 72 79 |it is a |ordinary|
|00005f40| 20 41 53 43 49 49 20 66 | 69 6c 65 2c 20 69 74 20 | ASCII f|ile, it |
|00005f50| 6d 61 79 20 62 65 0a 61 | 74 74 61 63 6b 65 64 20 |may be.a|ttacked |
|00005f60| 77 69 74 68 20 61 6e 79 | 20 6f 66 20 74 68 65 20 |with any| of the |
|00005f70| 6e 6f 72 6d 61 6c 20 55 | 6e 69 78 20 75 74 69 6c |normal U|nix util|
|00005f80| 69 74 69 65 73 2e 0a 2e | 73 70 20 30 2e 31 33 69 |ities...|sp 0.13i|
|00005f90| 0a 54 68 65 20 5c 66 42 | 64 65 73 74 69 6e 61 74 |.The \fB|destinat|
|00005fa0| 69 6f 6e 5c 66 52 20 6e | 61 6d 65 73 20 74 68 61 |ion\fR n|ames tha|
|00005fb0| 74 20 5c 66 49 73 61 76 | 65 73 72 63 5c 66 52 20 |t \fIsav|esrc\fR |
|00005fc0| 6b 6e 6f 77 73 20 61 62 | 6f 75 74 20 61 72 65 20 |knows ab|out are |
|00005fd0| 6f 6e 65 73 20 65 6e 64 | 69 6e 67 0a 69 6e 20 60 |ones end|ing.in `|
|00005fe0| 60 2e 3f 27 27 2c 20 60 | 60 2e 66 69 78 27 27 2c |`.?'', `|`.fix'',|
|00005ff0| 20 60 60 2e 62 75 67 27 | 27 2c 20 60 60 2e 70 61 | ``.bug'|', ``.pa|
|00006000| 74 63 68 27 27 2c 20 60 | 60 2e 5b 31 2d 38 5d 27 |tch'', `|`.[1-8]'|
|00006010| 27 2c 20 61 6e 64 20 60 | 60 52 45 41 44 2a 27 27 |', and `|`READ*''|
|00006020| 2c 0a 77 68 69 63 68 20 | 61 72 65 20 61 73 73 75 |,.which |are assu|
|00006030| 6d 65 64 20 74 6f 20 62 | 65 20 73 6f 75 72 63 65 |med to b|e source|
|00006040| 20 28 43 2c 20 59 41 43 | 43 2c 20 6c 65 78 2c 20 | (C, YAC|C, lex, |
|00006050| 65 74 63 2e 29 20 6f 72 | 20 68 65 61 64 65 72 20 |etc.) or| header |
|00006060| 66 69 6c 65 73 2c 0a 62 | 75 67 20 66 69 78 65 73 |files,.b|ug fixes|
|00006070| 2c 20 6d 61 6e 75 61 6c | 20 70 61 67 65 73 2c 20 |, manual| pages, |
|00006080| 6f 72 20 52 45 41 44 4d | 45 27 73 2e 0a 28 54 68 |or READM|E's..(Th|
|00006090| 65 20 60 60 2e 62 75 67 | 27 27 2c 20 60 60 2e 66 |e ``.bug|'', ``.f|
|000060a0| 69 78 27 27 2c 20 61 6e | 64 20 60 60 2e 70 61 74 |ix'', an|d ``.pat|
|000060b0| 63 68 27 27 20 73 75 66 | 66 69 78 65 73 20 65 78 |ch'' suf|fixes ex|
|000060c0| 69 73 74 20 74 6f 0a 61 | 6c 6c 6f 77 20 63 6f 6e |ist to.a|llow con|
|000060d0| 76 65 6e 69 65 6e 74 20 | 73 61 76 69 6e 67 20 6f |venient |saving o|
|000060e0| 66 20 62 75 67 73 2c 20 | 70 61 74 63 68 65 73 2c |f bugs, |patches,|
|000060f0| 20 61 6e 64 20 66 69 78 | 65 73 20 69 6e 20 61 20 | and fix|es in a |
|00006100| 67 65 6e 65 72 61 6c 20 | 73 6f 75 72 63 65 73 0a |general |sources.|
|00006110| 64 69 72 65 63 74 6f 72 | 79 2e 29 0a 41 6e 79 20 |director|y.).Any |
|00006120| 6f 74 68 65 72 20 64 65 | 73 74 69 6e 61 74 69 6f |other de|stinatio|
|00006130| 6e 20 6e 61 6d 65 20 69 | 73 20 61 73 73 75 6d 65 |n name i|s assume|
|00006140| 64 20 74 6f 20 62 65 20 | 61 20 73 75 62 2d 64 69 |d to be |a sub-di|
|00006150| 72 65 63 74 6f 72 79 20 | 75 6e 64 65 72 20 74 68 |rectory |under th|
|00006160| 65 20 6d 61 69 6e 0a 73 | 6f 75 72 63 65 73 20 64 |e main.s|ources d|
|00006170| 69 72 65 63 74 6f 72 79 | 2c 20 75 6e 6c 65 73 73 |irectory|, unless|
|00006180| 20 69 74 20 69 73 20 61 | 20 66 75 6c 6c 20 70 61 | it is a| full pa|
|00006190| 74 68 6e 61 6d 65 2e 0a | 2e 73 70 20 30 2e 32 69 |thname..|.sp 0.2i|
|000061a0| 0a 5c 66 42 53 69 6e 67 | 6c 65 20 53 6f 75 72 63 |.\fBSing|le Sourc|
|000061b0| 65 20 50 72 6f 67 72 61 | 6d 73 2c 20 48 65 61 64 |e Progra|ms, Head|
|000061c0| 65 72 20 46 69 6c 65 73 | 2c 20 61 6e 64 20 52 45 |er Files|, and RE|
|000061d0| 41 44 4d 45 27 73 5c 66 | 52 0a 2e 73 70 20 30 2e |ADME's\f|R..sp 0.|
|000061e0| 31 33 69 0a 5c 66 49 53 | 61 76 65 73 72 63 5c 66 |13i.\fIS|avesrc\f|
|000061f0| 52 20 74 72 69 65 73 20 | 74 6f 20 70 75 74 20 73 |R tries |to put s|
|00006200| 69 6e 67 6c 65 2d 66 69 | 6c 65 20 73 6f 75 72 63 |ingle-fi|le sourc|
|00006210| 65 73 2c 20 68 65 61 64 | 65 72 20 66 69 6c 65 73 |es, head|er files|
|00006220| 2c 20 61 6e 64 20 52 45 | 41 44 4d 45 27 73 0a 69 |, and RE|ADME's.i|
|00006230| 6e 20 74 68 65 20 6d 61 | 69 6e 20 73 6f 75 72 63 |n the ma|in sourc|
|00006240| 65 73 20 64 69 72 65 63 | 74 6f 72 79 2e 0a 49 66 |es direc|tory..If|
|00006250| 20 74 68 65 20 64 65 73 | 74 69 6e 61 74 69 6f 6e | the des|tination|
|00006260| 20 6e 61 6d 65 20 61 6c | 72 65 61 64 79 20 65 78 | name al|ready ex|
|00006270| 69 73 74 73 2c 20 74 68 | 65 20 75 73 65 72 20 69 |ists, th|e user i|
|00006280| 73 20 67 69 76 65 6e 20 | 74 68 65 20 63 68 6f 69 |s given |the choi|
|00006290| 63 65 20 6f 66 0a 6f 76 | 65 72 77 72 69 74 69 6e |ce of.ov|erwritin|
|000062a0| 67 20 69 74 2c 20 61 70 | 70 65 6e 64 69 6e 67 20 |g it, ap|pending |
|000062b0| 74 6f 20 69 74 2c 20 6f | 72 20 73 70 65 63 69 66 |to it, o|r specif|
|000062c0| 79 69 6e 67 20 61 20 6e | 65 77 20 64 65 73 74 69 |ying a n|ew desti|
|000062d0| 6e 61 74 69 6f 6e 0a 28 | 77 68 69 63 68 20 69 73 |nation.(|which is|
|000062e0| 20 61 6c 73 6f 20 63 68 | 65 63 6b 65 64 29 2e 0a | also ch|ecked)..|
|000062f0| 54 68 65 20 75 73 65 72 | 20 69 73 20 67 69 76 65 |The user| is give|
|00006300| 6e 20 61 20 63 68 61 6e | 63 65 20 74 6f 20 65 64 |n a chan|ce to ed|
|00006310| 69 74 20 74 68 65 20 66 | 69 6c 65 20 6f 72 20 73 |it the f|ile or s|
|00006320| 74 61 72 74 20 75 70 20 | 61 20 73 68 65 6c 6c 0a |tart up |a shell.|
|00006330| 66 6f 72 20 66 75 72 74 | 68 65 72 20 74 77 69 64 |for furt|her twid|
|00006340| 64 6c 69 6e 67 2e 0a 41 | 74 20 74 68 69 73 20 70 |dling..A|t this p|
|00006350| 6f 69 6e 74 20 5c 66 49 | 73 61 76 65 73 72 63 5c |oint \fI|savesrc\|
|00006360| 66 52 20 77 69 6c 6c 20 | 74 65 72 6d 69 6e 61 74 |fR will |terminat|
|00006370| 65 20 66 6f 72 20 68 65 | 61 64 65 72 20 66 69 6c |e for he|ader fil|
|00006380| 65 73 20 61 6e 64 20 52 | 45 41 44 4d 45 27 73 3b |es and R|EADME's;|
|00006390| 20 20 66 6f 72 0a 62 75 | 67 73 2c 20 66 69 78 65 | for.bu|gs, fixe|
|000063a0| 73 2c 20 61 6e 64 20 70 | 61 74 63 68 65 73 2c 20 |s, and p|atches, |
|000063b0| 74 68 65 20 75 73 65 72 | 20 77 69 6c 6c 20 62 65 |the user| will be|
|000063c0| 20 6f 66 66 65 72 65 64 | 20 61 20 73 68 65 6c 6c | offered| a shell|
|000063d0| 20 62 65 66 6f 72 65 20 | 5c 66 49 73 61 76 65 73 | before |\fIsaves|
|000063e0| 72 63 5c 66 52 0a 74 65 | 72 6d 69 6e 61 74 65 73 |rc\fR.te|rminates|
|000063f0| 2e 0a 2e 73 70 20 30 2e | 32 69 0a 5c 66 42 53 6f |...sp 0.|2i.\fBSo|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.