home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume8 / roff_bl < prev    next >
SHell self-extracting ARchive  |  1989-09-23  |  4.5 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 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 73 75 |.sources|.misc.su|
|00000020| 62 6a 65 63 74 3a 20 76 | 30 38 69 30 34 38 3a 20 |bject: v|08i048: |
|00000030| 72 6f 66 66 20 28 73 69 | 6d 70 6c 65 20 73 63 72 |roff (si|mple scr|
|00000040| 69 70 74 20 74 6f 20 69 | 6e 63 6c 75 64 65 20 66 |ipt to i|nclude f|
|00000050| 69 6c 74 65 72 73 20 26 | 20 6d 61 63 72 6f 73 20 |ilters &| macros |
|00000060| 69 6e 20 64 6f 63 75 6d | 65 6e 74 20 74 65 78 74 |in docum|ent text|
|00000070| 29 0a 46 72 6f 6d 3a 20 | 61 6c 6c 62 65 72 79 40 |).From: |allbery@|
|00000080| 75 75 6e 65 74 2e 55 55 | 2e 4e 45 54 20 28 42 72 |uunet.UU|.NET (Br|
|00000090| 61 6e 64 6f 6e 20 53 2e | 20 41 6c 6c 62 65 72 79 |andon S.| Allbery|
|000000a0| 20 2d 20 63 6f 6d 70 2e | 73 6f 75 72 63 65 73 2e | - comp.|sources.|
|000000b0| 6d 69 73 63 29 0a 52 65 | 70 6c 79 2d 54 6f 3a 20 |misc).Re|ply-To: |
|000000c0| 62 72 69 61 6e 40 64 65 | 63 77 72 6c 2e 64 65 63 |brian@de|cwrl.dec|
|000000d0| 2e 63 6f 6d 40 61 70 74 | 2e 55 55 43 50 0a 0a 50 |.com@apt|.UUCP..P|
|000000e0| 6f 73 74 69 6e 67 2d 6e | 75 6d 62 65 72 3a 20 56 |osting-n|umber: V|
|000000f0| 6f 6c 75 6d 65 20 38 2c | 20 49 73 73 75 65 20 34 |olume 8,| Issue 4|
|00000100| 38 0a 53 75 62 6d 69 74 | 74 65 64 2d 62 79 3a 20 |8.Submit|ted-by: |
|00000110| 62 72 69 61 6e 40 64 65 | 63 77 72 6c 2e 64 65 63 |brian@de|cwrl.dec|
|00000120| 2e 63 6f 6d 40 61 70 74 | 2e 55 55 43 50 0a 41 72 |.com@apt|.UUCP.Ar|
|00000130| 63 68 69 76 65 2d 6e 61 | 6d 65 3a 20 72 6f 66 66 |chive-na|me: roff|
|00000140| 5f 62 6c 0a 0a 54 68 69 | 73 20 73 63 72 69 70 74 |_bl..Thi|s script|
|00000150| 20 61 6c 6c 6f 77 73 20 | 79 6f 75 20 74 6f 20 69 | allows |you to i|
|00000160| 6e 63 6c 75 64 65 20 61 | 20 63 6f 6d 6d 65 6e 74 |nclude a| comment|
|00000170| 20 61 74 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e | at the |beginnin|
|00000180| 67 20 6f 66 20 79 6f 75 | 72 0a 74 72 6f 66 66 20 |g of you|r.troff |
|00000190| 64 6f 63 75 6d 65 6e 74 | 73 20 77 68 69 63 68 20 |document|s which |
|000001a0| 74 65 6c 6c 73 20 74 68 | 69 73 20 73 63 72 69 70 |tells th|is scrip|
|000001b0| 74 20 77 68 61 74 20 66 | 69 6c 74 65 72 73 20 61 |t what f|ilters a|
|000001c0| 6e 64 20 6d 61 63 72 6f | 73 20 74 6f 0a 72 75 6e |nd macro|s to.run|
|000001d0| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 20 74 68 | the doc|ument th|
|000001e0| 72 6f 75 67 68 20 62 65 | 66 6f 72 65 20 73 65 6e |rough be|fore sen|
|000001f0| 64 69 6e 67 20 69 74 20 | 74 6f 20 74 72 6f 66 66 |ding it |to troff|
|00000200| 2e 0a 0a 3c 3e 20 20 42 | 72 69 61 6e 20 4c 69 74 |...<> B|rian Lit|
|00000210| 7a 69 6e 67 65 72 20 40 | 20 41 50 54 20 54 65 63 |zinger @| APT Tec|
|00000220| 68 6e 6f 6c 6f 67 79 20 | 49 6e 63 2e 2c 20 53 61 |hnology |Inc., Sa|
|00000230| 6e 20 4a 6f 73 65 2c 20 | 43 41 0a 3c 3e 20 20 55 |n Jose, |CA.<> U|
|00000240| 55 43 50 3a 20 20 7b 61 | 70 70 6c 65 2c 73 75 6e |UCP: {a|pple,sun|
|00000250| 2c 70 79 72 61 6d 69 64 | 7d 21 64 61 76 65 72 21 |,pyramid|}!daver!|
|00000260| 61 70 74 21 62 72 69 61 | 6e 20 20 20 20 62 72 69 |apt!bria|n bri|
|00000270| 61 6e 40 61 70 74 2e 55 | 55 43 50 0a 3c 3e 20 20 |an@apt.U|UCP.<> |
|00000280| 56 4f 49 43 45 3a 20 34 | 30 38 20 33 37 30 20 39 |VOICE: 4|08 370 9|
|00000290| 30 37 37 20 20 20 20 20 | 20 46 41 58 3a 20 34 30 |077 | FAX: 40|
|000002a0| 38 20 33 37 30 20 39 32 | 39 31 0a 0a 23 21 20 2f |8 370 92|91..#! /|
|000002b0| 62 69 6e 2f 73 68 0a 23 | 20 54 68 69 73 20 69 73 |bin/sh.#| This is|
|000002c0| 20 61 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 | a shell| archive|
|000002d0| 2e 20 20 52 65 6d 6f 76 | 65 20 61 6e 79 74 68 69 |. Remov|e anythi|
|000002e0| 6e 67 20 62 65 66 6f 72 | 65 20 74 68 69 73 20 6c |ng befor|e this l|
|000002f0| 69 6e 65 2c 20 74 68 65 | 6e 20 75 6e 70 61 63 6b |ine, the|n unpack|
|00000300| 0a 23 20 69 74 20 62 79 | 20 73 61 76 69 6e 67 20 |.# it by| saving |
|00000310| 69 74 20 69 6e 74 6f 20 | 61 20 66 69 6c 65 20 61 |it into |a file a|
|00000320| 6e 64 20 74 79 70 69 6e | 67 20 22 73 68 20 66 69 |nd typin|g "sh fi|
|00000330| 6c 65 22 2e 20 20 54 6f | 20 6f 76 65 72 77 72 69 |le". To| overwri|
|00000340| 74 65 20 65 78 69 73 74 | 69 6e 67 0a 23 20 66 69 |te exist|ing.# fi|
|00000350| 6c 65 73 2c 20 74 79 70 | 65 20 22 73 68 20 66 69 |les, typ|e "sh fi|
|00000360| 6c 65 20 2d 63 22 2e 20 | 20 59 6f 75 20 63 61 6e |le -c". | You can|
|00000370| 20 61 6c 73 6f 20 66 65 | 65 64 20 74 68 69 73 20 | also fe|ed this |
|00000380| 61 73 20 73 74 61 6e 64 | 61 72 64 20 69 6e 70 75 |as stand|ard inpu|
|00000390| 74 20 76 69 61 0a 23 20 | 75 6e 73 68 61 72 2c 20 |t via.# |unshar, |
|000003a0| 6f 72 20 62 79 20 74 79 | 70 69 6e 67 20 22 73 68 |or by ty|ping "sh|
|000003b0| 20 3c 66 69 6c 65 22 2c | 20 65 2e 67 2e 2e 20 20 | <file",| e.g.. |
|000003c0| 49 66 20 74 68 69 73 20 | 61 72 63 68 69 76 65 20 |If this |archive |
|000003d0| 69 73 20 63 6f 6d 70 6c | 65 74 65 2c 20 79 6f 75 |is compl|ete, you|
|000003e0| 0a 23 20 77 69 6c 6c 20 | 73 65 65 20 74 68 65 20 |.# will |see the |
|000003f0| 66 6f 6c 6c 6f 77 69 6e | 67 20 6d 65 73 73 61 67 |followin|g messag|
|00000400| 65 20 61 74 20 74 68 65 | 20 65 6e 64 3a 0a 23 09 |e at the| end:.#.|
|00000410| 09 22 45 6e 64 20 6f 66 | 20 73 68 65 6c 6c 20 61 |."End of| shell a|
|00000420| 72 63 68 69 76 65 2e 22 | 0a 23 20 43 6f 6e 74 65 |rchive."|.# Conte|
|00000430| 6e 74 73 3a 20 20 52 45 | 41 44 4d 45 20 50 6f 72 |nts: RE|ADME Por|
|00000440| 74 61 62 69 6c 69 74 79 | 20 72 6f 66 66 0a 23 20 |tability| roff.# |
|00000450| 57 72 61 70 70 65 64 20 | 62 79 20 62 72 69 61 6e |Wrapped |by brian|
|00000460| 40 61 70 74 20 6f 6e 20 | 57 65 64 20 53 65 70 20 |@apt on |Wed Sep |
|00000470| 32 30 20 31 33 3a 31 35 | 3a 33 36 20 31 39 38 39 |20 13:15|:36 1989|
|00000480| 0a 50 41 54 48 3d 2f 62 | 69 6e 3a 2f 75 73 72 2f |.PATH=/b|in:/usr/|
|00000490| 62 69 6e 3a 2f 75 73 72 | 2f 75 63 62 20 3b 20 65 |bin:/usr|/ucb ; e|
|000004a0| 78 70 6f 72 74 20 50 41 | 54 48 0a 69 66 20 74 65 |xport PA|TH.if te|
|000004b0| 73 74 20 2d 66 20 27 52 | 45 41 44 4d 45 27 20 2d |st -f 'R|EADME' -|
|000004c0| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|000004d0| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|000004e0| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|000004f0| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00000500| 66 69 6c 65 20 5c 22 27 | 52 45 41 44 4d 45 27 5c |file \"'|README'\|
|00000510| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00000520| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00000530| 52 45 41 44 4d 45 27 5c | 22 20 5c 28 31 34 32 30 |README'\|" \(1420|
|00000540| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00000550| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 52 45 41 |d "s/^X/|/" >'REA|
|00000560| 44 4d 45 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |DME' <<'|END_OF_F|
|00000570| 49 4c 45 27 0a 58 72 6f | 66 66 20 69 73 20 61 20 |ILE'.Xro|ff is a |
|00000580| 73 63 72 69 70 74 20 74 | 68 61 74 20 61 6c 6c 6f |script t|hat allo|
|00000590| 77 73 20 79 6f 75 20 74 | 6f 20 65 6e 63 6f 64 65 |ws you t|o encode|
|000005a0| 20 74 68 65 20 66 69 6c | 74 65 72 73 20 74 68 61 | the fil|ters tha|
|000005b0| 74 20 61 20 74 72 6f 66 | 66 0a 58 66 69 6c 65 20 |t a trof|f.Xfile |
|000005c0| 6d 75 73 74 20 62 65 20 | 70 61 73 73 65 64 20 74 |must be |passed t|
|000005d0| 68 72 6f 75 67 68 20 61 | 6c 6f 6e 67 20 77 69 74 |hrough a|long wit|
|000005e0| 68 20 77 68 69 63 68 20 | 6d 61 63 72 6f 20 70 61 |h which |macro pa|
|000005f0| 63 6b 61 67 65 73 20 74 | 6f 20 75 73 65 0a 58 69 |ckages t|o use.Xi|
|00000600| 6e 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 20 66 |n the do|cument f|
|00000610| 69 6c 65 2e 0a 58 0a 58 | 54 6f 20 75 73 65 20 72 |ile..X.X|To use r|
|00000620| 6f 66 66 20 79 6f 75 20 | 73 69 6d 70 6c 79 20 61 |off you |simply a|
|00000630| 64 64 20 61 20 72 6f 66 | 66 20 63 6f 6d 6d 61 6e |dd a rof|f comman|
|00000640| 64 20 6c 69 6e 65 20 61 | 73 20 74 68 65 20 66 69 |d line a|s the fi|
|00000650| 72 73 74 20 6c 69 6e 65 | 20 6f 66 0a 58 79 6f 75 |rst line| of.Xyou|
|00000660| 72 20 64 6f 63 75 6d 65 | 6e 74 20 66 69 6c 65 2e |r docume|nt file.|
|00000670| 20 20 54 68 65 6e 20 77 | 68 65 6e 20 79 6f 75 20 | Then w|hen you |
|00000680| 77 69 73 68 20 74 6f 20 | 70 72 69 6e 74 20 6f 75 |wish to |print ou|
|00000690| 74 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 0a 58 |t the do|cument.X|
|000006a0| 79 6f 75 20 63 61 6e 20 | 73 69 6d 70 6c 79 20 65 |you can |simply e|
|000006b0| 6e 74 65 72 0a 58 0a 58 | 20 20 20 20 72 6f 66 66 |nter.X.X| roff|
|000006c0| 20 66 69 6c 65 6e 61 6d | 65 0a 58 0a 58 72 6f 66 | filenam|e.X.Xrof|
|000006d0| 66 20 77 69 6c 6c 20 67 | 65 6e 65 72 61 74 65 20 |f will g|enerate |
|000006e0| 74 68 65 20 63 6f 72 72 | 65 63 74 20 63 6f 6d 6d |the corr|ect comm|
|000006f0| 61 6e 64 20 73 74 72 65 | 61 6d 20 74 6f 20 70 72 |and stre|am to pr|
|00000700| 69 6e 74 20 74 68 65 20 | 66 69 6c 65 2e 0a 58 0a |int the |file..X.|
|00000710| 58 74 68 65 20 72 6f 66 | 66 20 63 6f 6d 6d 61 6e |Xthe rof|f comman|
|00000720| 64 20 6c 69 6e 65 20 69 | 73 20 62 61 73 69 63 61 |d line i|s basica|
|00000730| 6c 6c 79 20 61 20 6c 69 | 6e 65 20 6f 66 20 74 65 |lly a li|ne of te|
|00000740| 78 74 20 74 68 61 74 20 | 69 73 20 70 61 73 73 65 |xt that |is passe|
|00000750| 64 20 74 6f 0a 58 65 76 | 61 6c 28 31 29 2e 20 20 |d to.Xev|al(1). |
|00000760| 49 74 73 20 66 6f 72 6d | 61 74 20 69 73 20 61 73 |Its form|at is as|
|00000770| 20 66 6f 6c 6c 6f 77 73 | 3a 0a 58 0a 58 5c 22 20 | follows|:.X.X\" |
|00000780| 65 78 65 63 20 74 62 6c | 20 7c 20 70 69 63 20 7c |exec tbl| | pic ||
|00000790| 20 65 72 6f 66 66 20 2d | 6d 6d 0a 58 0a 58 74 68 | eroff -|mm.X.Xth|
|000007a0| 65 20 27 5c 22 27 20 69 | 73 20 61 20 74 72 6f 66 |e '\"' i|s a trof|
|000007b0| 66 2f 6e 72 6f 66 66 20 | 63 6f 6d 6d 65 6e 74 20 |f/nroff |comment |
|000007c0| 64 65 6c 69 6d 65 74 65 | 72 2e 20 20 54 68 65 20 |delimete|r. The |
|000007d0| 27 65 78 65 63 27 20 68 | 65 6c 70 73 20 69 64 65 |'exec' h|elps ide|
|000007e0| 6e 74 69 66 79 0a 58 74 | 68 69 73 20 6c 69 6e 65 |ntify.Xt|his line|
|000007f0| 20 61 73 20 61 20 72 6f | 66 66 20 63 6f 6d 6d 61 | as a ro|ff comma|
|00000800| 6e 64 20 6c 69 6e 65 2e | 0a 58 0a 58 74 68 65 20 |nd line.|.X.Xthe |
|00000810| 72 65 73 74 20 6f 66 20 | 74 68 65 20 6c 69 6e 65 |rest of |the line|
|00000820| 20 69 73 20 74 68 65 20 | 66 69 6c 74 65 72 73 2c | is the |filters,|
|00000830| 20 70 61 63 6b 61 67 65 | 73 2c 20 61 6e 64 20 6d | package|s, and m|
|00000840| 61 63 72 6f 73 20 74 68 | 61 74 20 74 68 65 0a 58 |acros th|at the.X|
|00000850| 64 6f 63 75 6d 65 6e 74 | 20 66 69 6c 65 20 73 68 |document| file sh|
|00000860| 6f 75 6c 64 20 62 65 20 | 70 61 73 73 65 64 20 74 |ould be |passed t|
|00000870| 68 72 6f 75 67 68 2e 20 | 20 4f 74 68 65 72 20 65 |hrough. | Other e|
|00000880| 78 61 6d 70 6c 65 73 20 | 61 72 65 3a 0a 58 0a 58 |xamples |are:.X.X|
|00000890| 5c 22 20 65 78 65 63 20 | 65 72 6f 66 66 0a 58 0a |\" exec |eroff.X.|
|000008a0| 58 5c 22 20 65 78 65 63 | 20 74 62 6c 20 7c 20 65 |X\" exec| tbl | e|
|000008b0| 72 6f 66 66 20 2d 6d 6d | 20 2d 6d 61 70 74 0a 58 |roff -mm| -mapt.X|
|000008c0| 0a 58 49 66 20 79 6f 75 | 20 6c 6f 6f 6b 20 61 74 |.XIf you| look at|
|000008d0| 20 74 68 65 20 72 6f 66 | 66 20 73 63 72 69 70 74 | the rof|f script|
|000008e0| 20 79 6f 75 20 77 69 6c | 6c 20 6e 6f 74 69 63 65 | you wil|l notice|
|000008f0| 20 74 68 61 74 20 77 65 | 20 73 74 72 69 70 20 6f | that we| strip o|
|00000900| 66 66 20 74 68 65 0a 58 | 66 69 72 73 74 20 6c 69 |ff the.X|first li|
|00000910| 6e 65 20 6f 66 20 74 68 | 65 20 64 6f 63 75 6d 65 |ne of th|e docume|
|00000920| 6e 74 20 66 69 6c 65 20 | 28 74 68 65 20 72 6f 66 |nt file |(the rof|
|00000930| 66 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 29 20 |f comman|d line) |
|00000940| 62 65 66 6f 72 65 20 77 | 65 0a 58 70 69 70 65 20 |before w|e.Xpipe |
|00000950| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 20 74 68 72 |the docu|ment thr|
|00000960| 6f 75 67 68 20 74 68 65 | 20 72 65 73 74 20 6f 66 |ough the| rest of|
|00000970| 20 74 68 65 20 66 69 6c | 74 65 72 73 2e 20 20 41 | the fil|ters. A|
|00000980| 74 20 66 69 72 73 74 20 | 67 6c 61 6e 63 65 0a 58 |t first |glance.X|
|00000990| 6f 6e 65 20 6d 69 67 68 | 74 20 74 68 69 6e 6b 20 |one migh|t think |
|000009a0| 74 68 69 73 20 69 73 6e | 27 74 20 6e 65 63 65 73 |this isn|'t neces|
|000009b0| 73 61 72 79 2c 20 62 75 | 74 20 74 68 65 20 6d 6d |sary, bu|t the mm|
|000009c0| 20 6d 61 63 72 6f 73 20 | 61 72 65 20 69 6e 20 6d | macros |are in m|
|000009d0| 79 0a 58 6f 70 69 6e 69 | 6f 6e 20 62 72 6f 6b 65 |y.Xopini|on broke|
|000009e0| 2c 20 6f 72 20 61 74 20 | 6c 65 61 73 74 20 74 68 |, or at |least th|
|000009f0| 65 20 6f 6e 65 73 20 77 | 65 20 68 61 76 65 20 61 |e ones w|e have a|
|00000a00| 72 65 2e 20 20 49 66 20 | 74 68 65 20 76 65 72 79 |re. If |the very|
|00000a10| 20 66 69 72 73 74 0a 58 | 70 68 79 73 69 63 61 6c | first.X|physical|
|00000a20| 20 6c 69 6e 65 20 6f 66 | 20 74 68 65 20 64 6f 63 | line of| the doc|
|00000a30| 75 6d 65 6e 74 20 69 73 | 6e 27 74 20 2e 50 48 20 |ument is|n't .PH |
|00000a40| 22 27 27 27 27 22 20 79 | 6f 75 20 67 65 74 20 74 |"''''" y|ou get t|
|00000a50| 68 65 20 68 65 61 64 65 | 72 2e 0a 58 45 76 65 6e |he heade|r..XEven|
|00000a60| 20 69 66 20 74 68 65 20 | 66 69 72 73 74 20 6c 69 | if the |first li|
|00000a70| 6e 65 20 69 73 20 73 69 | 6d 70 6c 79 20 61 20 63 |ne is si|mply a c|
|00000a80| 6f 6d 6d 65 6e 74 2c 20 | 6c 69 6b 65 20 74 68 65 |omment, |like the|
|00000a90| 20 72 6f 66 66 20 63 6f | 6d 6d 61 6e 64 20 6c 69 | roff co|mmand li|
|00000aa0| 6e 65 2e 0a 58 0a 58 59 | 6f 75 20 6d 69 67 68 74 |ne..X.XY|ou might|
|00000ab0| 20 61 6c 73 6f 20 6e 6f | 74 69 63 65 20 61 20 72 | also no|tice a r|
|00000ac0| 65 66 65 72 65 6e 63 65 | 20 74 6f 20 27 24 46 27 |eference| to '$F'|
|00000ad0| 2e 20 20 54 68 69 73 20 | 69 73 20 6e 65 63 65 73 |. This |is neces|
|00000ae0| 73 61 72 79 20 66 6f 72 | 20 75 73 0a 58 74 6f 20 |sary for| us.Xto |
|00000af0| 62 65 20 63 6f 6d 70 61 | 74 69 62 6c 65 20 77 69 |be compa|tible wi|
|00000b00| 74 68 20 61 6e 20 6f 6c | 64 65 72 20 72 6f 66 66 |th an ol|der roff|
|00000b10| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 20 66 6f | command| line fo|
|00000b20| 72 6d 61 74 2e 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |rmat..EN|D_OF_FIL|
|00000b30| 45 0a 69 66 20 74 65 73 | 74 20 31 34 32 30 20 2d |E.if tes|t 1420 -|
|00000b40| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 52 45 41 44 |ne `wc -|c <'READ|
|00000b50| 4d 45 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |ME'`; th|en. e|
|00000b60| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 52 45 41 |cho shar|: \"'REA|
|00000b70| 44 4d 45 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |DME'\" u|npacked |
|00000b80| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00000b90| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 52 45 |.fi.# en|d of 'RE|
|00000ba0| 41 44 4d 45 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |ADME'.fi|.if test|
|00000bb0| 20 2d 66 20 27 50 6f 72 | 74 61 62 69 6c 69 74 79 | -f 'Por|tability|
|00000bc0| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00000bd0| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00000be0| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|00000bf0| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00000c00| 6e 67 20 66 69 6c 65 20 | 5c 22 27 50 6f 72 74 61 |ng file |\"'Porta|
|00000c10| 62 69 6c 69 74 79 27 5c | 22 0a 65 6c 73 65 0a 65 |bility'\|".else.e|
|00000c20| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|00000c30| 74 69 6e 67 20 5c 22 27 | 50 6f 72 74 61 62 69 6c |ting \"'|Portabil|
|00000c40| 69 74 79 27 5c 22 20 5c | 28 32 36 36 20 63 68 61 |ity'\" \|(266 cha|
|00000c50| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|00000c60| 2f 5e 58 2f 2f 22 20 3e | 27 50 6f 72 74 61 62 69 |/^X//" >|'Portabi|
|00000c70| 6c 69 74 79 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |lity' <<|'END_OF_|
|00000c80| 46 49 4c 45 27 0a 58 50 | 6f 72 74 61 62 69 6c 69 |FILE'.XP|ortabili|
|00000c90| 74 79 20 43 6f 6e 63 65 | 72 6e 73 3a 0a 58 0a 58 |ty Conce|rns:.X.X|
|00000ca0| 72 6f 66 66 20 75 73 65 | 73 20 68 65 61 64 28 31 |roff use|s head(1|
|00000cb0| 29 2e 20 20 49 27 76 65 | 20 68 65 61 72 64 20 73 |). I've| heard s|
|00000cc0| 6f 6d 65 20 55 4e 49 58 | 65 73 20 64 6f 6e 27 74 |ome UNIX|es don't|
|00000cd0| 20 68 61 76 65 20 68 65 | 61 64 2e 20 73 69 67 68 | have he|ad. sigh|
|00000ce0| 2e 2e 2e 0a 58 0a 58 77 | 65 20 75 73 65 20 65 72 |....X.Xw|e use er|
|00000cf0| 6f 66 66 2c 20 79 6f 75 | 20 77 69 6c 6c 20 70 72 |off, you| will pr|
|00000d00| 6f 62 61 62 6c 79 20 77 | 61 6e 74 20 74 6f 20 63 |obably w|ant to c|
|00000d10| 68 61 6e 67 65 20 74 68 | 65 20 73 65 63 6f 6e 64 |hange th|e second|
|00000d20| 20 6c 69 6e 65 20 6f 66 | 0a 58 72 6f 66 66 20 66 | line of|.Xroff f|
|00000d30| 72 6f 6d 20 65 72 6f 66 | 66 20 74 6f 20 74 72 6f |rom erof|f to tro|
|00000d40| 66 66 2c 20 61 6e 64 20 | 63 68 61 6e 67 65 20 74 |ff, and |change t|
|00000d50| 68 65 20 65 78 61 6d 70 | 6c 65 73 20 61 70 70 72 |he examp|les appr|
|00000d60| 6f 70 72 69 61 74 65 6c | 79 2e 0a 58 0a 58 72 6f |opriatel|y..X.Xro|
|00000d70| 66 66 20 77 61 73 20 77 | 72 69 74 74 65 6e 20 6f |ff was w|ritten o|
|00000d80| 6e 20 61 20 53 79 73 74 | 65 6d 20 56 20 73 79 73 |n a Syst|em V sys|
|00000d90| 74 65 6d 2e 20 20 0a 58 | 0a 45 4e 44 5f 4f 46 5f |tem. .X|.END_OF_|
|00000da0| 46 49 4c 45 0a 69 66 20 | 74 65 73 74 20 32 36 36 |FILE.if |test 266|
|00000db0| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 50 6f | -ne `wc| -c <'Po|
|00000dc0| 72 74 61 62 69 6c 69 74 | 79 27 60 3b 20 74 68 65 |rtabilit|y'`; the|
|00000dd0| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00000de0| 20 5c 22 27 50 6f 72 74 | 61 62 69 6c 69 74 79 27 | \"'Port|ability'|
|00000df0| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00000e00| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00000e10| 23 20 65 6e 64 20 6f 66 | 20 27 50 6f 72 74 61 62 |# end of| 'Portab|
|00000e20| 69 6c 69 74 79 27 0a 66 | 69 0a 69 66 20 74 65 73 |ility'.f|i.if tes|
|00000e30| 74 20 2d 66 20 27 72 6f | 66 66 27 20 2d 61 20 22 |t -f 'ro|ff' -a "|
|00000e40| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|00000e50| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00000e60| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|00000e70| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|00000e80| 65 20 5c 22 27 72 6f 66 | 66 27 5c 22 0a 65 6c 73 |e \"'rof|f'\".els|
|00000e90| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|00000ea0| 72 61 63 74 69 6e 67 20 | 5c 22 27 72 6f 66 66 27 |racting |\"'roff'|
|00000eb0| 5c 22 20 5c 28 35 39 39 | 20 63 68 61 72 61 63 74 |\" \(599| charact|
|00000ec0| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00000ed0| 2f 22 20 3e 27 72 6f 66 | 66 27 20 3c 3c 27 45 4e |/" >'rof|f' <<'EN|
|00000ee0| 44 5f 4f 46 5f 46 49 4c | 45 27 0a 58 23 20 72 6f |D_OF_FIL|E'.X# ro|
|00000ef0| 66 66 20 62 79 20 42 72 | 69 61 6e 20 45 2e 20 4c |ff by Br|ian E. L|
|00000f00| 69 74 7a 69 6e 67 65 72 | 0a 58 54 52 4f 46 46 3d |itzinger|.XTROFF=|
|00000f10| 65 72 6f 66 66 0a 58 54 | 4d 50 3d 2f 74 6d 70 2f |eroff.XT|MP=/tmp/|
|00000f20| 72 6f 66 66 24 24 0a 58 | 66 6f 72 20 66 69 6c 65 |roff$$.X|for file|
|00000f30| 20 69 6e 20 24 2a 0a 58 | 64 6f 0a 58 20 20 20 20 | in $*.X|do.X |
|00000f40| 63 61 73 65 20 24 66 69 | 6c 65 20 69 6e 0a 58 09 |case $fi|le in.X.|
|00000f50| 2d 2a 29 0a 58 09 20 20 | 20 20 61 72 67 73 3d 22 |-*).X. | args="|
|00000f60| 24 61 72 67 73 20 24 66 | 69 6c 65 22 0a 58 09 3b |$args $f|ile".X.;|
|00000f70| 3b 0a 58 09 2a 29 0a 58 | 09 20 20 20 20 63 6f 6d |;.X.*).X|. com|
|00000f80| 6d 61 6e 64 5f 6c 69 6e | 65 3d 22 60 68 65 61 64 |mand_lin|e="`head|
|00000f90| 20 2d 31 20 24 66 69 6c | 65 60 22 0a 58 09 20 20 | -1 $fil|e`".X. |
|00000fa0| 20 20 62 3d 22 60 65 63 | 68 6f 20 24 63 6f 6d 6d | b="`ec|ho $comm|
|00000fb0| 61 6e 64 5f 6c 69 6e 65 | 20 7c 20 63 75 74 20 2d |and_line| | cut -|
|00000fc0| 63 31 2d 38 60 22 0a 58 | 09 20 20 20 20 69 66 20 |c1-8`".X|. if |
|00000fd0| 5b 20 22 24 62 22 20 21 | 3d 20 27 5c 22 20 65 78 |[ "$b" !|= '\" ex|
|00000fe0| 65 63 20 27 20 5d 20 3b | 20 74 68 65 6e 0a 58 09 |ec ' ] ;| then.X.|
|00000ff0| 09 65 63 68 6f 20 22 24 | 66 69 6c 65 20 6e 6f 74 |.echo "$|file not|
|00001000| 20 72 6f 66 66 20 66 6f | 72 6d 61 74 20 66 69 6c | roff fo|rmat fil|
|00001010| 65 21 22 0a 58 09 09 65 | 78 69 74 20 32 0a 58 09 |e!".X..e|xit 2.X.|
|00001020| 20 20 20 20 66 69 0a 58 | 09 20 20 20 20 63 6f 6d | fi.X|. com|
|00001030| 6d 61 6e 64 3d 22 60 65 | 63 68 6f 20 24 63 6f 6d |mand="`e|cho $com|
|00001040| 6d 61 6e 64 5f 6c 69 6e | 65 20 7c 20 63 75 74 20 |mand_lin|e | cut |
|00001050| 2d 63 39 2d 20 60 22 0a | 58 09 20 20 20 20 64 3d |-c9- `".|X. d=|
|00001060| 22 73 65 64 20 2d 65 20 | 27 31 64 27 20 24 66 69 |"sed -e |'1d' $fi|
|00001070| 6c 65 20 7c 22 0a 58 09 | 20 20 20 20 66 6f 72 20 |le |".X.| for |
|00001080| 69 20 69 6e 20 24 63 6f | 6d 6d 61 6e 64 20 3b 20 |i in $co|mmand ; |
|00001090| 64 6f 0a 58 09 09 69 66 | 20 5b 20 22 24 69 22 20 |do.X..if| [ "$i" |
|000010a0| 3d 20 27 24 46 27 20 5d | 20 3b 20 74 68 65 6e 0a |= '$F' ]| ; then.|
|000010b0| 58 09 09 20 20 20 20 74 | 72 75 65 0a 58 09 09 65 |X.. t|rue.X..e|
|000010c0| 6c 73 65 0a 58 09 09 20 | 20 20 20 69 66 20 5b 20 |lse.X.. | if [ |
|000010d0| 22 24 69 22 20 3d 20 22 | 24 54 52 4f 46 46 22 20 |"$i" = "|$TROFF" |
|000010e0| 5d 20 3b 20 74 68 65 6e | 0a 58 09 09 09 64 3d 22 |] ; then|.X...d="|
|000010f0| 24 64 20 24 69 20 24 61 | 72 67 73 22 0a 58 09 09 |$d $i $a|rgs".X..|
|00001100| 20 20 20 20 65 6c 73 65 | 0a 58 09 09 09 64 3d 22 | else|.X...d="|
|00001110| 24 64 20 24 69 22 0a 58 | 09 09 20 20 20 20 66 69 |$d $i".X|.. fi|
|00001120| 0a 58 09 09 66 69 0a 58 | 09 20 20 20 20 64 6f 6e |.X..fi.X|. don|
|00001130| 65 0a 58 09 20 20 20 20 | 23 65 63 68 6f 20 24 64 |e.X. |#echo $d|
|00001140| 0a 58 09 20 20 20 20 65 | 76 61 6c 20 24 64 0a 58 |.X. e|val $d.X|
|00001150| 09 3b 3b 0a 58 20 20 20 | 20 65 73 61 63 0a 58 64 |.;;.X | esac.Xd|
|00001160| 6f 6e 65 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |one.END_|OF_FILE.|
|00001170| 69 66 20 74 65 73 74 20 | 35 39 39 20 2d 6e 65 20 |if test |599 -ne |
|00001180| 60 77 63 20 2d 63 20 3c | 27 72 6f 66 66 27 60 3b |`wc -c <|'roff'`;|
|00001190| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|000011a0| 68 61 72 3a 20 5c 22 27 | 72 6f 66 66 27 5c 22 20 |har: \"'|roff'\" |
|000011b0| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|000011c0| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 63 68 6d |ong size|!.fi.chm|
|000011d0| 6f 64 20 2b 78 20 27 72 | 6f 66 66 27 0a 23 20 65 |od +x 'r|off'.# e|
|000011e0| 6e 64 20 6f 66 20 27 72 | 6f 66 66 27 0a 66 69 0a |nd of 'r|off'.fi.|
|000011f0| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 6e 64 20 6f |echo sha|r: End o|
|00001200| 66 20 73 68 65 6c 6c 20 | 61 72 63 68 69 76 65 2e |f shell |archive.|
|00001210| 0a 65 78 69 74 20 30 0a | 0a 0a 0a |.exit 0.|... |
+--------+-------------------------+-------------------------+--------+--------+