home *** CD-ROM | disk | FTP | other *** search
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: part06
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail, 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)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 30 38 69 30 30 |Subject:| v08i00|
|00000010| 36 3a 20 20 47 65 6f 72 | 67 69 61 20 54 65 63 68 |6: Geor|gia Tech|
|00000020| 20 27 73 65 27 20 53 63 | 72 65 65 6e 20 45 64 69 | 'se' Sc|reen Edi|
|00000030| 74 6f 72 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |tor.News|groups: |
|00000040| 6d 6f 64 2e 73 6f 75 72 | 63 65 73 0a 41 70 70 72 |mod.sour|ces.Appr|
|00000050| 6f 76 65 64 3a 20 6d 69 | 72 72 6f 72 21 72 73 0a |oved: mi|rror!rs.|
|00000060| 0a 53 75 62 6d 69 74 74 | 65 64 20 62 79 3a 20 65 |.Submitt|ed by: e|
|00000070| 6d 6f 72 79 75 31 21 61 | 72 6e 6f 6c 64 20 28 41 |moryu1!a|rnold (A|
|00000080| 72 6e 6f 6c 64 20 44 2e | 20 52 6f 62 62 69 6e 73 |rnold D.| Robbins|
|00000090| 29 0a 4d 6f 64 2e 73 6f | 75 72 63 65 73 3a 20 56 |).Mod.so|urces: V|
|000000a0| 6f 6c 75 6d 65 20 38 2c | 20 49 73 73 75 65 20 36 |olume 8,| Issue 6|
|000000b0| 0a 41 72 63 68 69 76 65 | 2d 6e 61 6d 65 3a 20 73 |.Archive|-name: s|
|000000c0| 65 2f 50 61 72 74 30 36 | 0a 0a 0a 48 65 72 65 20 |e/Part06|...Here |
|000000d0| 69 73 20 74 68 65 20 73 | 65 63 6f 6e 64 20 72 65 |is the s|econd re|
|000000e0| 6c 65 61 73 65 20 6f 66 | 20 74 68 65 20 47 65 6f |lease of| the Geo|
|000000f0| 72 67 69 61 20 54 65 63 | 68 20 53 63 72 65 65 6e |rgia Tec|h Screen|
|00000100| 20 45 64 69 74 6f 72 2c | 20 27 73 65 27 2e 0a 54 | Editor,| 'se'..T|
|00000110| 68 65 72 65 20 77 65 72 | 65 20 65 6e 6f 75 67 68 |here wer|e enough|
|00000120| 20 63 68 61 6e 67 65 73 | 20 74 68 61 74 20 61 20 | changes| that a |
|00000130| 77 68 6f 6c 65 20 6e 65 | 77 20 70 6f 73 74 69 6e |whole ne|w postin|
|00000140| 67 20 69 73 20 77 61 72 | 72 61 6e 74 65 64 2e 0a |g is war|ranted..|
|00000150| 0a 4d 61 6a 6f 72 20 43 | 68 61 6e 67 65 73 3a 0a |.Major C|hanges:.|
|00000160| 09 41 6c 6c 20 47 65 6f | 72 67 69 61 20 54 65 63 |.All Geo|rgia Tec|
|00000170| 68 20 73 70 65 63 69 66 | 69 63 20 73 74 75 66 66 |h specif|ic stuff|
|00000180| 20 72 65 6d 6f 76 65 64 | 2e 0a 09 49 74 20 75 6e | removed|...It un|
|00000190| 64 65 72 73 74 61 6e 64 | 73 20 77 69 6e 64 6f 77 |derstand|s window|
|000001a0| 20 73 69 7a 65 20 63 68 | 61 6e 67 65 73 20 6f 6e | size ch|anges on|
|000001b0| 20 34 2e 33 42 53 44 20 | 61 6e 64 20 41 54 54 20 | 4.3BSD |and ATT |
|000001c0| 55 6e 69 78 20 50 43 2f | 33 42 31 0a 09 53 75 70 |Unix PC/|3B1..Sup|
|000001d0| 70 6f 72 74 20 66 6f 72 | 20 74 68 65 20 73 68 61 |port for| the sha|
|000001e0| 72 65 64 20 6c 69 62 72 | 61 72 79 20 6f 6e 20 74 |red libr|ary on t|
|000001f0| 68 65 20 41 54 54 20 55 | 6e 69 78 20 50 43 2f 33 |he ATT U|nix PC/3|
|00000200| 42 31 0a 09 43 6f 6e 73 | 69 64 65 72 61 62 6c 65 |B1..Cons|iderable|
|00000210| 20 73 6f 75 72 63 65 20 | 63 6f 64 65 20 72 65 6f | source |code reo|
|00000220| 72 67 61 6e 69 7a 61 74 | 69 6f 6e 20 69 6e 20 63 |rganizat|ion in c|
|00000230| 65 72 74 61 69 6e 20 66 | 69 6c 65 73 2e 0a 0a 45 |ertain f|iles...E|
|00000240| 6e 6a 6f 79 2c 0a 0a 41 | 72 6e 6f 6c 64 20 52 6f |njoy,..A|rnold Ro|
|00000250| 62 62 69 6e 73 0a 0a 23 | 21 20 2f 62 69 6e 2f 73 |bbins..#|! /bin/s|
|00000260| 68 0a 23 20 54 68 69 73 | 20 69 73 20 61 20 73 68 |h.# This| is a sh|
|00000270| 65 6c 6c 20 61 72 63 68 | 69 76 65 2c 20 6d 65 61 |ell arch|ive, mea|
|00000280| 6e 69 6e 67 3a 0a 23 20 | 31 2e 20 52 65 6d 6f 76 |ning:.# |1. Remov|
|00000290| 65 20 65 76 65 72 79 74 | 68 69 6e 67 20 61 62 6f |e everyt|hing abo|
|000002a0| 76 65 20 74 68 65 20 23 | 21 20 2f 62 69 6e 2f 73 |ve the #|! /bin/s|
|000002b0| 68 20 6c 69 6e 65 2e 0a | 23 20 32 2e 20 53 61 76 |h line..|# 2. Sav|
|000002c0| 65 20 74 68 65 20 72 65 | 73 75 6c 74 69 6e 67 20 |e the re|sulting |
|000002d0| 74 65 78 74 20 69 6e 20 | 61 20 66 69 6c 65 2e 0a |text in |a file..|
|000002e0| 23 20 33 2e 20 45 78 65 | 63 75 74 65 20 74 68 65 |# 3. Exe|cute the|
|000002f0| 20 66 69 6c 65 20 77 69 | 74 68 20 2f 62 69 6e 2f | file wi|th /bin/|
|00000300| 73 68 20 28 6e 6f 74 20 | 63 73 68 29 20 74 6f 20 |sh (not |csh) to |
|00000310| 63 72 65 61 74 65 20 74 | 68 65 20 66 69 6c 65 73 |create t|he files|
|00000320| 3a 0a 23 09 52 45 41 44 | 4d 45 0a 23 09 4d 61 6b |:.#.READ|ME.#.Mak|
|00000330| 65 66 69 6c 65 0a 23 09 | 49 6e 73 74 61 6c 6c 0a |efile.#.|Install.|
|00000340| 23 09 61 0a 23 09 61 62 | 74 0a 23 09 61 68 0a 23 |#.a.#.ab|t.#.ah.#|
|00000350| 09 61 72 67 32 0a 23 09 | 61 72 67 73 0a 23 09 62 |.arg2.#.|args.#.b|
|00000360| 0a 23 09 62 61 6e 67 0a | 23 09 62 75 67 0a 23 09 |.#.bang.|#.bug.#.|
|00000370| 63 0a 23 09 63 63 0a 23 | 09 63 63 6d 69 73 63 0a |c.#.cc.#|.ccmisc.|
|00000380| 23 09 63 68 61 72 64 65 | 6c 0a 23 09 63 68 61 72 |#.charde|l.#.char|
|00000390| 69 6e 73 0a 23 09 63 6f | 6c 6f 6e 0a 23 09 63 6f |ins.#.co|lon.#.co|
|000003a0| 6d 0a 23 09 63 6f 6d 64 | 69 72 0a 23 09 63 6f 6d |m.#.comd|ir.#.com|
|000003b0| 73 79 6e 0a 23 09 64 0a | 23 09 64 65 74 61 62 2e |syn.#.d.|#.detab.|
|000003c0| 63 0a 23 09 64 69 72 0a | 23 09 65 0a 23 09 65 68 |c.#.dir.|#.e.#.eh|
|000003d0| 0a 23 09 65 6c 70 0a 23 | 09 65 71 75 61 6c 0a 23 |.#.elp.#|.equal.#|
|000003e0| 09 66 0a 23 09 67 0a 23 | 09 68 0a 23 09 69 0a 23 |.f.#.g.#|.h.#.i.#|
|000003f0| 09 6a 0a 23 09 6b 0a 23 | 09 6c 0a 23 09 6c 69 73 |.j.#.k.#|.l.#.lis|
|00000400| 74 0a 23 09 6c 6e 0a 23 | 09 6d 0a 23 09 6d 6f 74 |t.#.ln.#|.m.#.mot|
|00000410| 69 6f 6e 0a 23 09 6e 0a | 65 78 70 6f 72 74 20 50 |ion.#.n.|export P|
|00000420| 41 54 48 3b 20 50 41 54 | 48 3d 2f 62 69 6e 3a 24 |ATH; PAT|H=/bin:$|
|00000430| 50 41 54 48 0a 69 66 20 | 74 65 73 74 20 21 20 2d |PATH.if |test ! -|
|00000440| 64 20 27 73 65 5f 68 27 | 0a 74 68 65 6e 0a 09 65 |d 'se_h'|.then..e|
|00000450| 63 68 6f 20 73 68 61 72 | 3a 20 63 72 65 61 74 69 |cho shar|: creati|
|00000460| 6e 67 20 64 69 72 65 63 | 74 6f 72 79 20 22 27 73 |ng direc|tory "'s|
|00000470| 65 5f 68 27 22 0a 09 6d | 6b 64 69 72 20 27 73 65 |e_h'"..m|kdir 'se|
|00000480| 5f 68 27 0a 66 69 0a 65 | 63 68 6f 20 73 68 61 72 |_h'.fi.e|cho shar|
|00000490| 3a 20 65 6e 74 65 72 69 | 6e 67 20 64 69 72 65 63 |: enteri|ng direc|
|000004a0| 74 6f 72 79 20 22 27 73 | 65 5f 68 27 22 0a 63 64 |tory "'s|e_h'".cd|
|000004b0| 20 27 73 65 5f 68 27 0a | 65 63 68 6f 20 73 68 61 | 'se_h'.|echo sha|
|000004c0| 72 3a 20 65 78 74 72 61 | 63 74 69 6e 67 20 22 27 |r: extra|cting "'|
|000004d0| 52 45 41 44 4d 45 27 22 | 20 27 28 37 32 38 20 63 |README'"| '(728 c|
|000004e0| 68 61 72 61 63 74 65 72 | 73 29 27 0a 69 66 20 74 |haracter|s)'.if t|
|000004f0| 65 73 74 20 2d 66 20 27 | 52 45 41 44 4d 45 27 0a |est -f '|README'.|
|00000500| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|00000510| 20 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 | will no|t over-w|
|00000520| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|00000530| 6c 65 20 22 27 52 45 41 | 44 4d 45 27 22 0a 65 6c |le "'REA|DME'".el|
|00000540| 73 65 0a 63 61 74 20 3c | 3c 20 5c 53 48 41 52 5f |se.cat <|< \SHAR_|
|00000550| 45 4f 46 20 3e 20 27 52 | 45 41 44 4d 45 27 0a 23 |EOF > 'R|EADME'.#|
|00000560| 20 0a 23 20 24 48 65 61 | 64 65 72 3a 20 52 45 41 | .# $Hea|der: REA|
|00000570| 44 4d 45 2c 76 20 31 2e | 32 20 38 36 2f 31 30 2f |DME,v 1.|2 86/10/|
|00000580| 30 37 20 31 35 3a 31 37 | 3a 33 34 20 61 72 6e 6f |07 15:17|:34 arno|
|00000590| 6c 64 20 45 78 70 20 24 | 0a 23 20 0a 23 20 24 4c |ld Exp $|.# .# $L|
|000005a0| 6f 67 3a 09 52 45 41 44 | 4d 45 2c 76 20 24 0a 23 |og:.READ|ME,v $.#|
|000005b0| 20 52 65 76 69 73 69 6f | 6e 20 31 2e 32 20 20 38 | Revisio|n 1.2 8|
|000005c0| 36 2f 31 30 2f 30 37 20 | 20 31 35 3a 31 37 3a 33 |6/10/07 | 15:17:3|
|000005d0| 34 20 20 61 72 6e 6f 6c | 64 0a 23 20 53 77 74 20 |4 arnol|d.# Swt |
|000005e0| 68 65 6c 70 20 66 69 6c | 65 73 20 72 65 6d 6f 76 |help fil|es remov|
|000005f0| 65 64 2c 20 73 6f 20 6e | 6f 20 6c 6f 6e 67 65 72 |ed, so n|o longer|
|00000600| 20 64 65 73 63 72 69 62 | 65 64 2e 0a 23 20 0a 23 | describ|ed..# .#|
|00000610| 20 52 65 76 69 73 69 6f | 6e 20 31 2e 31 20 20 38 | Revisio|n 1.1 8|
|00000620| 36 2f 30 35 2f 30 36 20 | 20 31 34 3a 30 34 3a 32 |6/05/06 | 14:04:2|
|00000630| 36 20 20 6f 73 61 64 72 | 0a 23 20 49 6e 69 74 69 |6 osadr|.# Initi|
|00000640| 61 6c 20 72 65 76 69 73 | 69 6f 6e 0a 23 20 0a 23 |al revis|ion.# .#|
|00000650| 20 0a 23 20 0a 52 45 41 | 44 4d 45 3a 0a 0a 54 68 | .# .REA|DME:..Th|
|00000660| 69 73 20 64 69 72 65 63 | 74 6f 72 79 20 63 6f 6e |is direc|tory con|
|00000670| 74 61 69 6e 73 20 74 68 | 65 20 68 65 6c 70 20 66 |tains th|e help f|
|00000680| 69 6c 65 73 20 66 6f 72 | 20 74 68 65 20 47 65 6f |iles for| the Geo|
|00000690| 72 67 69 61 20 54 65 63 | 68 20 53 6f 66 74 77 61 |rgia Tec|h Softwa|
|000006a0| 72 65 20 54 6f 6f 6c 73 | 2f 55 4e 49 58 0a 73 63 |re Tools|/UNIX.sc|
|000006b0| 72 65 65 6e 20 65 64 69 | 74 6f 72 20 53 65 2e 0a |reen edi|tor Se..|
|000006c0| 0a 54 68 65 20 66 69 6c | 65 73 20 73 68 6f 75 6c |.The fil|es shoul|
|000006d0| 64 20 62 65 20 69 6e 73 | 74 61 6c 6c 65 64 20 69 |d be ins|talled i|
|000006e0| 6e 20 74 68 65 20 64 69 | 72 65 63 74 6f 72 79 20 |n the di|rectory |
|000006f0| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 6c 69 62 2f 73 |/usr/loc|al/lib/s|
|00000700| 65 5f 68 20 66 6f 72 20 | 73 65 20 69 6e 0a 6f 72 |e_h for |se in.or|
|00000710| 64 65 72 20 66 6f 72 20 | 73 65 20 74 6f 20 66 69 |der for |se to fi|
|00000720| 6e 64 20 74 68 65 6d 2e | 20 46 69 6c 65 20 6e 61 |nd them.| File na|
|00000730| 6d 65 73 20 6d 75 73 74 | 20 62 65 20 69 6e 20 6c |mes must| be in l|
|00000740| 6f 77 65 72 20 63 61 73 | 65 2c 20 73 69 6e 63 65 |ower cas|e, since|
|00000750| 20 64 6f 68 65 6c 70 28 | 29 20 6d 61 70 73 0a 74 | dohelp(|) maps.t|
|00000760| 68 65 20 66 69 6c 65 20 | 6e 61 6d 65 20 69 6e 74 |he file |name int|
|00000770| 6f 20 61 6c 6c 20 6c 6f | 77 65 72 20 63 61 73 65 |o all lo|wer case|
|00000780| 2e 20 28 4f 6e 20 70 72 | 31 6d 65 73 2c 20 63 61 |. (On pr|1mes, ca|
|00000790| 73 65 20 69 73 20 6e 6f | 74 20 73 69 67 6e 69 66 |se is no|t signif|
|000007a0| 69 63 61 6e 74 20 69 6e | 0a 66 69 6c 65 20 6e 61 |icant in|.file na|
|000007b0| 6d 65 73 2c 20 73 6f 20 | 74 68 65 20 6f 72 69 67 |mes, so |the orig|
|000007c0| 69 6e 61 6c 20 72 61 74 | 66 6f 72 20 76 65 72 73 |inal rat|for vers|
|000007d0| 69 6f 6e 20 64 69 64 20 | 6e 6f 74 20 68 61 76 65 |ion did |not have|
|000007e0| 20 74 6f 20 64 6f 20 74 | 68 69 73 2e 29 0a 0a 41 | to do t|his.)..A|
|000007f0| 72 6e 6f 6c 64 20 52 6f | 62 62 69 6e 73 0a 66 6f |rnold Ro|bbins.fo|
|00000800| 72 6d 65 72 6c 79 20 6f | 66 20 47 65 6f 72 67 69 |rmerly o|f Georgi|
|00000810| 61 20 54 65 63 68 0a 4e | 6f 77 20 77 69 74 68 20 |a Tech.N|ow with |
|00000820| 45 6d 6f 72 79 20 55 6e | 69 76 65 72 73 69 74 79 |Emory Un|iversity|
|00000830| 0a 31 30 2f 38 36 0a 53 | 48 41 52 5f 45 4f 46 0a |.10/86.S|HAR_EOF.|
|00000840| 66 69 20 23 20 65 6e 64 | 20 6f 66 20 6f 76 65 72 |fi # end| of over|
|00000850| 77 72 69 74 69 6e 67 20 | 63 68 65 63 6b 0a 65 63 |writing |check.ec|
|00000860| 68 6f 20 73 68 61 72 3a | 20 65 78 74 72 61 63 74 |ho shar:| extract|
|00000870| 69 6e 67 20 22 27 4d 61 | 6b 65 66 69 6c 65 27 22 |ing "'Ma|kefile'"|
|00000880| 20 27 28 31 30 39 33 20 | 63 68 61 72 61 63 74 65 | '(1093 |characte|
|00000890| 72 73 29 27 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |rs)'.if |test -f |
|000008a0| 27 4d 61 6b 65 66 69 6c | 65 27 0a 74 68 65 6e 0a |'Makefil|e'.then.|
|000008b0| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 77 69 6c 6c |.echo sh|ar: will|
|000008c0| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|000008d0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 22 27 |existing| file "'|
|000008e0| 4d 61 6b 65 66 69 6c 65 | 27 22 0a 65 6c 73 65 0a |Makefile|'".else.|
|000008f0| 63 61 74 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |cat << \|SHAR_EOF|
|00000900| 20 3e 20 27 4d 61 6b 65 | 66 69 6c 65 27 0a 23 20 | > 'Make|file'.# |
|00000910| 0a 23 20 24 48 65 61 64 | 65 72 3a 20 4d 61 6b 65 |.# $Head|er: Make|
|00000920| 66 69 6c 65 2c 76 20 31 | 2e 32 20 38 36 2f 31 30 |file,v 1|.2 86/10|
|00000930| 2f 30 37 20 31 35 3a 31 | 35 3a 30 34 20 61 72 6e |/07 15:1|5:04 arn|
|00000940| 6f 6c 64 20 45 78 70 20 | 24 0a 23 20 0a 23 20 24 |old Exp |$.# .# $|
|00000950| 4c 6f 67 3a 09 4d 61 6b | 65 66 69 6c 65 2c 76 20 |Log:.Mak|efile,v |
|00000960| 24 0a 23 20 52 65 76 69 | 73 69 6f 6e 20 31 2e 32 |$.# Revi|sion 1.2|
|00000970| 20 20 38 36 2f 31 30 2f | 30 37 20 20 31 35 3a 31 | 86/10/|07 15:1|
|00000980| 35 3a 30 34 20 20 61 72 | 6e 6f 6c 64 0a 23 20 55 |5:04 ar|nold.# U|
|00000990| 70 64 61 74 65 64 20 74 | 6f 20 72 65 66 6c 65 63 |pdated t|o reflec|
|000009a0| 74 20 63 75 72 72 65 6e | 74 20 73 65 74 20 6f 66 |t curren|t set of|
|000009b0| 20 68 65 6c 70 20 66 69 | 6c 65 73 2e 0a 23 20 0a | help fi|les..# .|
|000009c0| 23 20 52 65 76 69 73 69 | 6f 6e 20 31 2e 31 20 20 |# Revisi|on 1.1 |
|000009d0| 38 36 2f 30 35 2f 30 36 | 20 20 31 34 3a 30 34 3a |86/05/06| 14:04:|
|000009e0| 31 37 20 20 6f 73 61 64 | 72 0a 23 20 49 6e 69 74 |17 osad|r.# Init|
|000009f0| 69 61 6c 20 72 65 76 69 | 73 69 6f 6e 0a 23 20 0a |ial revi|sion.# .|
|00000a00| 23 20 0a 23 20 0a 23 20 | 6d 61 6b 65 66 69 6c 65 |# .# .# |makefile|
|00000a10| 20 66 6f 72 20 73 65 20 | 68 65 6c 70 20 73 63 72 | for se |help scr|
|00000a20| 69 70 74 73 0a 0a 44 4f | 43 53 3d 20 52 45 41 44 |ipts..DO|CS= READ|
|00000a30| 4d 45 0a 0a 46 49 4c 45 | 53 3d 20 61 20 61 62 74 |ME..FILE|S= a abt|
|00000a40| 20 61 68 20 61 72 67 32 | 20 61 72 67 73 20 62 20 | ah arg2| args b |
|00000a50| 62 61 6e 67 20 62 75 67 | 20 63 20 63 63 20 63 63 |bang bug| c cc cc|
|00000a60| 6d 69 73 63 20 63 68 61 | 72 64 65 6c 20 63 68 61 |misc cha|rdel cha|
|00000a70| 72 69 6e 73 20 63 6f 6c | 6f 6e 20 5c 0a 09 63 6f |rins col|on \..co|
|00000a80| 6d 20 63 6f 6d 64 69 72 | 20 63 6f 6d 73 79 6e 20 |m comdir| comsyn |
|00000a90| 64 20 64 69 72 20 65 20 | 65 68 20 65 6c 70 20 65 |d dir e |eh elp e|
|00000aa0| 71 75 61 6c 20 66 20 67 | 20 68 20 69 20 6a 20 6b |qual f g| h i j k|
|00000ab0| 20 6c 20 6c 69 73 74 20 | 6c 6e 20 6d 20 5c 0a 09 | l list |ln m \..|
|00000ac0| 6d 6f 74 69 6f 6e 20 6e | 20 6f 20 6f 2d 20 6f 61 |motion n| o o- oa|
|00000ad0| 20 6f 63 20 6f 64 20 6f | 66 20 6f 67 20 6f 68 20 | oc od o|f og oh |
|00000ae0| 6f 69 20 6f 6b 20 6f 6c | 20 6f 6c 6d 20 6f 6d 20 |oi ok ol| olm om |
|00000af0| 6f 73 20 6f 74 20 6f 75 | 20 6f 76 20 6f 77 20 5c |os ot ou| ov ow \|
|00000b00| 0a 09 6f 78 20 6f 79 20 | 6f 7a 20 70 20 70 61 74 |..ox oy |oz p pat|
|00000b10| 20 70 61 74 65 78 20 71 | 20 71 75 6f 74 65 20 72 | patex q| quote r|
|00000b20| 20 72 70 74 20 73 20 73 | 63 61 6e 20 73 65 72 63 | rpt s s|can serc|
|00000b30| 20 73 68 65 6c 6c 20 73 | 70 65 63 6c 20 74 20 5c | shell s|pecl t \|
|00000b40| 0a 09 74 65 72 6d 63 68 | 61 72 20 74 69 6c 64 65 |..termch|ar tilde|
|00000b50| 20 75 20 76 20 77 20 78 | 20 79 20 7a 0a 0a 23 20 | u v w x| y z..# |
|00000b60| 64 65 73 74 69 6e 61 74 | 69 6f 6e 20 66 6f 72 20 |destinat|ion for |
|00000b70| 66 69 6e 61 6c 09 76 65 | 72 73 69 6f 6e 09 6f 66 |final.ve|rsion.of|
|00000b80| 20 68 65 6c 70 09 73 63 | 72 69 70 74 73 2e 0a 49 | help.sc|ripts..I|
|00000b90| 4e 53 54 41 4c 4c 3d 2f | 75 73 72 2f 6c 6f 63 61 |NSTALL=/|usr/loca|
|00000ba0| 6c 2f 6c 69 62 2f 73 65 | 5f 68 0a 0a 69 6e 73 74 |l/lib/se|_h..inst|
|00000bb0| 61 6c 6c 3a 20 65 78 69 | 73 74 73 61 6c 6c 20 64 |all: exi|stsall d|
|00000bc0| 65 74 61 62 0a 09 2e 2f | 49 6e 73 74 61 6c 6c 20 |etab.../|Install |
|00000bd0| 24 28 49 4e 53 54 41 4c | 4c 29 20 24 28 46 49 4c |$(INSTAL|L) $(FIL|
|00000be0| 45 53 29 0a 0a 65 78 69 | 73 74 73 61 6c 6c 3a 20 |ES)..exi|stsall: |
|00000bf0| 24 28 46 49 4c 45 53 29 | 20 24 28 44 4f 43 53 29 |$(FILES)| $(DOCS)|
|00000c00| 20 49 6e 73 74 61 6c 6c | 0a 09 40 65 63 68 6f 20 | Install|..@echo |
|00000c10| 74 68 69 73 20 6d 65 73 | 73 61 67 65 20 69 6e 64 |this mes|sage ind|
|00000c20| 69 63 61 74 65 73 20 61 | 6c 6c 20 74 68 65 20 66 |icates a|ll the f|
|00000c30| 69 6c 65 73 20 65 78 69 | 73 74 2c 20 6f 74 68 65 |iles exi|st, othe|
|00000c40| 72 77 69 73 65 20 6d 61 | 6b 65 20 77 6f 75 6c 64 |rwise ma|ke would|
|00000c50| 20 64 69 65 2e 0a 0a 64 | 65 74 61 62 3a 20 64 65 | die...d|etab: de|
|00000c60| 74 61 62 2e 63 0a 09 63 | 63 20 2d 4f 20 2d 6f 20 |tab.c..c|c -O -o |
|00000c70| 64 65 74 61 62 20 64 65 | 74 61 62 2e 63 0a 0a 63 |detab de|tab.c..c|
|00000c80| 6c 65 61 6e 3a 0a 09 72 | 6d 20 2d 66 20 64 65 74 |lean:..r|m -f det|
|00000c90| 61 62 20 70 72 69 6e 74 | 32 0a 0a 63 6c 6f 62 62 |ab print|2..clobb|
|00000ca0| 65 72 3a 20 63 6c 65 61 | 6e 0a 0a 0a 70 72 69 6e |er: clea|n...prin|
|00000cb0| 74 3a 0a 09 70 72 74 20 | 24 28 44 4f 43 53 29 20 |t:..prt |$(DOCS) |
|00000cc0| 4d 61 6b 65 66 69 6c 65 | 20 49 6e 73 74 61 6c 6c |Makefile| Install|
|00000cd0| 20 24 28 46 49 4c 45 53 | 29 20 7c 20 6c 70 72 20 | $(FILES|) | lpr |
|00000ce0| 2d 62 20 27 73 65 20 68 | 65 6c 70 27 0a 09 74 6f |-b 'se h|elp'..to|
|00000cf0| 75 63 68 20 70 72 69 6e | 74 32 0a 0a 70 72 69 6e |uch prin|t2..prin|
|00000d00| 74 32 3a 09 24 28 44 4f | 43 53 29 09 4d 61 6b 65 |t2:.$(DO|CS).Make|
|00000d10| 66 69 6c 65 20 49 6e 73 | 74 61 6c 6c 20 24 28 46 |file Ins|tall $(F|
|00000d20| 49 4c 45 53 29 0a 09 70 | 72 74 20 24 3f 20 7c 20 |ILES)..p|rt $? | |
|00000d30| 6c 70 72 20 2d 62 09 27 | 6e 65 77 20 73 65 09 68 |lpr -b.'|new se.h|
|00000d40| 65 6c 70 27 0a 09 74 6f | 75 63 68 20 70 72 69 6e |elp'..to|uch prin|
|00000d50| 74 32 0a 53 48 41 52 5f | 45 4f 46 0a 66 69 20 23 |t2.SHAR_|EOF.fi #|
|00000d60| 20 65 6e 64 20 6f 66 20 | 6f 76 65 72 77 72 69 74 | end of |overwrit|
|00000d70| 69 6e 67 20 63 68 65 63 | 6b 0a 65 63 68 6f 20 73 |ing chec|k.echo s|
|00000d80| 68 61 72 3a 20 65 78 74 | 72 61 63 74 69 6e 67 20 |har: ext|racting |
|00000d90| 22 27 49 6e 73 74 61 6c | 6c 27 22 20 27 28 36 37 |"'Instal|l'" '(67|
|00000da0| 38 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 69 |8 charac|ters)'.i|
|00000db0| 66 20 74 65 73 74 20 2d | 66 20 27 49 6e 73 74 61 |f test -|f 'Insta|
|00000dc0| 6c 6c 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |ll'.then|..echo s|
|00000dd0| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|00000de0| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00000df0| 67 20 66 69 6c 65 20 22 | 27 49 6e 73 74 61 6c 6c |g file "|'Install|
|00000e00| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|00000e10| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 49 6e 73 74 |SHAR_EOF| > 'Inst|
|00000e20| 61 6c 6c 27 0a 23 21 20 | 2f 62 69 6e 2f 73 68 0a |all'.#! |/bin/sh.|
|00000e30| 23 20 0a 23 20 24 48 65 | 61 64 65 72 3a 20 49 6e |# .# $He|ader: In|
|00000e40| 73 74 61 6c 6c 2c 76 20 | 31 2e 32 20 38 36 2f 31 |stall,v |1.2 86/1|
|00000e50| 30 2f 30 37 20 31 35 3a | 30 39 3a 30 38 20 61 72 |0/07 15:|09:08 ar|
|00000e60| 6e 6f 6c 64 20 45 78 70 | 20 24 0a 23 20 0a 23 20 |nold Exp| $.# .# |
|00000e70| 24 4c 6f 67 3a 09 49 6e | 73 74 61 6c 6c 2c 76 20 |$Log:.In|stall,v |
|00000e80| 24 0a 23 20 52 65 76 69 | 73 69 6f 6e 20 31 2e 32 |$.# Revi|sion 1.2|
|00000e90| 20 20 38 36 2f 31 30 2f | 30 37 20 20 31 35 3a 30 | 86/10/|07 15:0|
|00000ea0| 39 3a 30 38 20 20 61 72 | 6e 6f 6c 64 0a 23 20 46 |9:08 ar|nold.# F|
|00000eb0| 69 78 65 64 20 74 6f 20 | 6d 61 6b 65 20 74 68 65 |ixed to |make the|
|00000ec0| 20 68 65 6c 70 20 64 69 | 72 65 63 74 6f 72 79 20 | help di|rectory |
|00000ed0| 61 6e 64 20 75 73 65 20 | 72 65 6c 61 74 69 76 65 |and use |relative|
|00000ee0| 20 70 61 74 68 73 2e 0a | 23 20 0a 23 20 52 65 76 | paths..|# .# Rev|
|00000ef0| 69 73 69 6f 6e 20 31 2e | 31 20 20 38 36 2f 30 35 |ision 1.|1 86/05|
|00000f00| 2f 30 36 20 20 31 34 3a | 30 34 3a 30 34 20 20 6f |/06 14:|04:04 o|
|00000f10| 73 61 64 72 0a 23 20 49 | 6e 69 74 69 61 6c 20 72 |sadr.# I|nitial r|
|00000f20| 65 76 69 73 69 6f 6e 0a | 23 20 0a 23 20 0a 23 20 |evision.|# .# .# |
|00000f30| 0a 3a 20 49 6e 73 74 61 | 6c 6c 20 2d 2d 20 70 75 |.: Insta|ll -- pu|
|00000f40| 74 20 73 65 20 68 65 6c | 70 20 66 69 6c 65 73 20 |t se hel|p files |
|00000f50| 69 6e 74 6f 20 74 68 65 | 69 72 20 70 72 6f 70 65 |into the|ir prope|
|00000f60| 72 20 64 69 72 65 63 74 | 6f 72 79 2e 0a 3a 09 20 |r direct|ory..:. |
|00000f70| 20 20 20 20 54 68 69 73 | 20 70 72 6f 67 72 61 6d | This| program|
|00000f80| 20 69 73 20 63 61 6c 6c | 65 64 20 66 72 6f 6d 20 | is call|ed from |
|00000f90| 74 68 65 20 6d 61 6b 65 | 66 69 6c 65 2e 0a 0a 49 |the make|file...I|
|00000fa0| 4e 53 54 41 4c 4c 3d 24 | 31 0a 73 68 69 66 74 0a |NSTALL=$|1.shift.|
|00000fb0| 75 6d 61 73 6b 20 30 32 | 32 0a 0a 69 66 20 5b 20 |umask 02|2..if [ |
|00000fc0| 21 20 2d 64 20 24 49 4e | 53 54 41 4c 4c 20 5d 0a |! -d $IN|STALL ].|
|00000fd0| 74 68 65 6e 0a 09 65 63 | 68 6f 20 6d 61 6b 69 6e |then..ec|ho makin|
|00000fe0| 67 20 64 69 72 65 63 74 | 6f 72 79 20 24 49 4e 53 |g direct|ory $INS|
|00000ff0| 54 4c 4c 0a 09 69 66 20 | 6d 6b 64 69 72 20 24 49 |TLL..if |mkdir $I|
|00001000| 4e 53 54 41 4c 4c 0a 09 | 74 68 65 6e 0a 09 09 3a |NSTALL..|then...:|
|00001010| 0a 09 65 6c 73 65 0a 09 | 09 65 63 68 6f 20 63 6f |..else..|.echo co|
|00001020| 75 6c 64 20 6e 6f 74 20 | 6d 6b 64 69 72 20 24 49 |uld not |mkdir $I|
|00001030| 4e 53 54 41 4c 4c 0a 09 | 09 65 78 69 74 20 31 0a |NSTALL..|.exit 1.|
|00001040| 09 66 69 0a 66 69 0a 0a | 66 6f 72 20 69 20 69 6e |.fi.fi..|for i in|
|00001050| 20 24 2a 0a 64 6f 0a 09 | 65 63 68 6f 20 69 6e 73 | $*.do..|echo ins|
|00001060| 74 61 6c 6c 69 6e 67 20 | 24 69 0a 09 2e 2f 64 65 |talling |$i.../de|
|00001070| 74 61 62 20 3c 20 24 69 | 20 3e 20 24 49 4e 53 54 |tab < $i| > $INST|
|00001080| 41 4c 4c 2f 24 69 0a 64 | 6f 6e 65 0a 0a 3a 20 77 |ALL/$i.d|one..: w|
|00001090| 65 20 72 65 61 6c 6c 79 | 20 73 68 6f 75 6c 64 20 |e really| should |
|000010a0| 64 6f 20 73 6f 6d 65 20 | 65 72 72 6f 72 20 63 68 |do some |error ch|
|000010b0| 65 63 6b 69 6e 67 2c 20 | 62 75 74 20 77 68 61 74 |ecking, |but what|
|000010c0| 20 74 68 65 20 68 65 63 | 6b 2e 0a 53 48 41 52 5f | the hec|k..SHAR_|
|000010d0| 45 4f 46 0a 63 68 6d 6f | 64 20 2b 78 20 27 49 6e |EOF.chmo|d +x 'In|
|000010e0| 73 74 61 6c 6c 27 0a 66 | 69 20 23 20 65 6e 64 20 |stall'.f|i # end |
|000010f0| 6f 66 20 6f 76 65 72 77 | 72 69 74 69 6e 67 20 63 |of overw|riting c|
|00001100| 68 65 63 6b 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |heck.ech|o shar: |
|00001110| 65 78 74 72 61 63 74 69 | 6e 67 20 22 27 61 27 22 |extracti|ng "'a'"|
|00001120| 20 27 28 37 39 33 20 63 | 68 61 72 61 63 74 65 72 | '(793 c|haracter|
|00001130| 73 29 27 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |s)'.if t|est -f '|
|00001140| 61 27 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |a'.then.|.echo sh|
|00001150| 61 72 3a 20 77 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |ar: will| not ove|
|00001160| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00001170| 20 66 69 6c 65 20 22 27 | 61 27 22 0a 65 6c 73 65 | file "'|a'".else|
|00001180| 0a 63 61 74 20 3c 3c 20 | 5c 53 48 41 52 5f 45 4f |.cat << |\SHAR_EO|
|00001190| 46 20 3e 20 27 61 27 0a | 20 20 20 20 20 20 20 20 |F > 'a'.| |
|000011a0| 20 61 20 20 20 20 2d 2d | 20 41 70 70 65 6e 64 20 | a --| Append |
|000011b0| 63 6f 6d 6d 61 6e 64 0a | 0a 20 20 20 20 20 20 20 |command.|. |
|000011c0| 20 20 20 20 20 20 20 64 | 65 66 61 75 6c 74 20 72 | d|efault r|
|000011d0| 61 6e 67 65 20 20 20 20 | 20 20 20 20 20 20 20 73 |ange | s|
|000011e0| 79 6e 74 61 78 0a 20 20 | 20 20 20 20 20 20 20 20 |yntax. | |
|000011f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001200| 2e 20 20 20 20 20 20 20 | 20 20 20 20 61 0a 0a 20 |. | a.. |
|00001210| 20 20 20 20 20 20 20 22 | 61 22 20 69 73 20 66 6f | "|a" is fo|
|00001220| 72 20 61 70 70 65 6e 64 | 69 6e 67 20 6e 65 77 20 |r append|ing new |
|00001230| 6c 69 6e 65 73 20 6f 66 | 20 74 65 78 74 20 61 66 |lines of| text af|
|00001240| 74 65 72 20 61 20 67 69 | 76 65 6e 20 6c 69 6e 65 |ter a gi|ven line|
|00001250| 2e 20 20 49 66 0a 20 20 | 20 20 20 20 20 20 6e 6f |. If. | no|
|00001260| 20 6c 69 6e 65 20 6e 75 | 6d 62 65 72 20 69 73 20 | line nu|mber is |
|00001270| 74 79 70 65 64 20 62 65 | 66 6f 72 65 20 74 68 65 |typed be|fore the|
|00001280| 20 22 61 22 2c 20 74 65 | 78 74 20 77 69 6c 6c 20 | "a", te|xt will |
|00001290| 62 65 20 20 61 70 70 65 | 6e 64 65 64 0a 20 20 20 |be appe|nded. |
|000012a0| 20 20 20 20 20 61 66 74 | 65 72 20 20 74 68 65 20 | aft|er the |
|000012b0| 20 63 75 72 72 65 6e 74 | 20 20 6c 69 6e 65 2e 20 | current| line. |
|000012c0| 20 54 68 65 20 6c 61 73 | 74 20 6c 69 6e 65 20 61 | The las|t line a|
|000012d0| 70 70 65 6e 64 65 64 20 | 62 65 63 6f 6d 65 73 20 |ppended |becomes |
|000012e0| 74 68 65 0a 20 20 20 20 | 20 20 20 20 63 75 72 72 |the. | curr|
|000012f0| 65 6e 74 20 6c 69 6e 65 | 2e 20 20 54 6f 20 73 69 |ent line|. To si|
|00001300| 67 6e 61 6c 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |gnal the| end of |
|00001310| 20 74 68 65 20 20 61 70 | 70 65 6e 64 65 64 20 20 | the ap|pended |
|00001320| 74 65 78 74 2c 20 20 79 | 6f 75 0a 20 20 20 20 20 |text, y|ou. |
|00001330| 20 20 20 74 79 70 65 20 | 61 20 22 2e 22 20 20 6f | type |a "." o|
|00001340| 6e 20 61 20 6c 69 6e 65 | 20 62 79 20 69 74 73 65 |n a line| by itse|
|00001350| 6c 66 2e 20 20 43 6f 6e | 74 72 6f 6c 20 63 68 61 |lf. Con|trol cha|
|00001360| 72 61 63 74 65 72 73 20 | 22 66 22 2c 20 22 76 22 |racters |"f", "v"|
|00001370| 2c 0a 20 20 20 20 20 20 | 20 20 22 6c 22 2c 20 20 |,. | "l", |
|00001380| 61 6e 64 20 20 22 6b 22 | 20 20 77 6f 72 6b 20 64 |and "k"| work d|
|00001390| 69 66 66 65 72 65 6e 74 | 6c 79 20 66 6f 72 20 22 |ifferent|ly for "|
|000013a0| 61 22 20 63 6f 6d 6d 61 | 6e 64 20 74 68 61 6e 20 |a" comma|nd than |
|000013b0| 66 6f 72 20 22 76 22 2e | 0a 20 20 20 20 20 20 20 |for "v".|. |
|000013c0| 20 22 61 3a 22 20 20 77 | 6f 72 6b 73 20 61 73 20 | "a:" w|orks as |
|000013d0| 61 20 6f 6e 65 20 6c 69 | 6e 65 20 61 70 70 65 6e |a one li|ne appen|
|000013e0| 64 20 28 69 2e 65 2e 20 | 61 6e 79 74 68 69 6e 67 |d (i.e. |anything|
|000013f0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 20 74 68 65 0a | followi|ng the.|
|00001400| 20 20 20 20 20 20 20 20 | 63 6f 6c 6f 6e 20 69 73 | |colon is|
|00001410| 20 61 70 70 65 6e 64 65 | 64 20 61 66 74 65 72 20 | appende|d after |
|00001420| 74 68 65 20 63 75 72 72 | 65 6e 74 20 6c 69 6e 65 |the curr|ent line|
|00001430| 29 2e 0a 0a 20 20 20 20 | 20 20 20 20 54 6f 20 72 |)... | To r|
|00001440| 65 74 75 72 6e 20 74 6f | 20 74 68 65 20 63 6f 6d |eturn to| the com|
|00001450| 6d 61 6e 64 20 64 69 72 | 65 63 74 6f 72 79 2c 20 |mand dir|ectory, |
|00001460| 74 79 70 65 20 22 68 63 | 6f 6d 64 69 72 2e 22 0a |type "hc|omdir.".|
|00001470| 20 20 20 20 20 20 20 20 | 53 65 65 20 61 6c 73 6f | |See also|
|00001480| 3a 20 20 22 68 63 63 22 | 20 28 63 6f 6e 74 72 6f |: "hcc"| (contro|
|00001490| 6c 20 63 68 61 72 61 63 | 74 65 72 73 29 20 61 6e |l charac|ters) an|
|000014a0| 64 20 22 68 63 22 20 28 | 63 68 61 6e 67 65 29 2e |d "hc" (|change).|
|000014b0| 0a 53 48 41 52 5f 45 4f | 46 0a 66 69 20 23 20 65 |.SHAR_EO|F.fi # e|
|000014c0| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|000014d0| 67 20 63 68 65 63 6b 0a | 65 63 68 6f 20 73 68 61 |g check.|echo sha|
|000014e0| 72 3a 20 65 78 74 72 61 | 63 74 69 6e 67 20 22 27 |r: extra|cting "'|
|000014f0| 61 62 74 27 22 20 27 28 | 35 39 39 20 63 68 61 72 |abt'" '(|599 char|
|00001500| 61 63 74 65 72 73 29 27 | 0a 69 66 20 74 65 73 74 |acters)'|.if test|
|00001510| 20 2d 66 20 27 61 62 74 | 27 0a 74 68 65 6e 0a 09 | -f 'abt|'.then..|
|00001520| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|00001530| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00001540| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 61 |xisting |file "'a|
|00001550| 62 74 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |bt'".els|e.cat <<|
|00001560| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 61 62 | \SHAR_E|OF > 'ab|
|00001570| 74 27 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t'. | |
|00001580| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001590| 20 20 41 62 6f 72 74 20 | 63 68 61 72 61 63 74 65 | Abort |characte|
|000015a0| 72 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r | |
|000015b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000015c0| 20 0a 0a 20 20 20 20 20 | 20 20 20 43 54 52 4c 2d | .. | CTRL-|
|000015d0| 46 20 28 22 46 75 6e 6e | 79 20 52 65 74 75 72 6e |F ("Funn|y Return|
|000015e0| 22 29 20 63 68 61 72 61 | 63 74 65 72 20 20 69 73 |") chara|cter is|
|000015f0| 20 20 75 73 65 64 20 20 | 74 6f 20 20 61 62 6f 72 | used |to abor|
|00001600| 74 20 20 61 20 20 22 76 | 22 0a 20 20 20 20 20 20 |t a "v|". |
|00001610| 20 20 63 6f 6d 6d 61 6e | 64 20 20 62 65 66 6f 72 | comman|d befor|
|00001620| 65 20 20 61 6c 6c 20 20 | 74 68 65 20 20 73 70 65 |e all |the spe|
|00001630| 63 69 66 69 65 64 20 6c | 69 6e 65 73 20 68 61 76 |cified l|ines hav|
|00001640| 65 20 62 65 65 6e 20 6d | 6f 64 69 66 69 65 64 2e |e been m|odified.|
|00001650| 0a 20 20 20 20 20 20 20 | 20 54 79 70 69 6e 67 20 |. | Typing |
|00001660| 69 74 20 63 61 75 73 65 | 73 20 74 68 65 20 63 75 |it cause|s the cu|
|00001670| 72 72 65 6e 74 20 6c 69 | 6e 65 20 74 6f 20 62 65 |rrent li|ne to be|
|00001680| 20 72 65 73 74 6f 72 65 | 64 20 74 6f 20 69 74 73 | restore|d to its|
|00001690| 20 20 73 74 61 74 65 0a | 20 20 20 20 20 20 20 20 | state.| |
|000016a0| 6f 66 20 20 62 65 66 6f | 72 65 20 20 74 68 65 20 |of befo|re the |
|000016b0| 20 22 76 22 20 63 6f 6d | 6d 61 6e 64 20 77 61 73 | "v" com|mand was|
|000016c0| 20 62 65 67 75 6e 2c 20 | 61 6e 64 20 63 61 75 73 | begun, |and caus|
|000016d0| 65 73 20 61 20 72 65 74 | 75 72 6e 20 74 6f 0a 20 |es a ret|urn to. |
|000016e0| 20 20 20 20 20 20 20 74 | 68 65 20 65 64 69 74 6f | t|he edito|
|000016f0| 72 27 73 20 63 6f 6d 6d | 61 6e 64 20 6c 65 76 65 |r's comm|and leve|
|00001700| 6c 2e 0a 0a 0a 20 20 20 | 20 20 20 20 20 54 79 70 |l.... | Typ|
|00001710| 65 20 22 68 76 22 20 66 | 6f 72 20 61 20 64 65 73 |e "hv" f|or a des|
|00001720| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |cription| of the |
|00001730| 22 76 22 20 63 6f 6d 6d | 61 6e 64 2e 0a 20 20 20 |"v" comm|and.. |
|00001740| 20 20 20 20 20 54 79 70 | 65 20 22 68 72 70 74 22 | Typ|e "hrpt"|
|00001750| 20 66 6f 72 20 43 54 52 | 4c 2d 46 27 73 20 6d 65 | for CTR|L-F's me|
|00001760| 61 6e 69 6e 67 20 69 66 | 20 69 6e 20 61 70 70 65 |aning if| in appe|
|00001770| 6e 64 20 6f 72 20 63 6f | 6d 6d 61 6e 64 20 6d 6f |nd or co|mmand mo|
|00001780| 64 65 2e 0a 20 20 20 20 | 20 20 20 20 54 79 70 65 |de.. | Type|
|00001790| 20 22 68 74 65 72 6d 63 | 68 61 72 22 20 66 6f 72 | "htermc|har" for|
|000017a0| 20 69 6e 66 6f 20 61 62 | 6f 75 74 20 6f 74 68 65 | info ab|out othe|
|000017b0| 72 20 74 65 72 6d 69 6e | 61 74 69 6f 6e 20 63 68 |r termin|ation ch|
|000017c0| 61 72 61 63 74 65 72 73 | 2e 0a 53 48 41 52 5f 45 |aracters|..SHAR_E|
|000017d0| 4f 46 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |OF.fi # |end of o|
|000017e0| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|000017f0| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 65 78 74 72 |.echo sh|ar: extr|
|00001800| 61 63 74 69 6e 67 20 22 | 27 61 68 27 22 20 27 28 |acting "|'ah'" '(|
|00001810| 31 34 32 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |142 char|acters)'|
|00001820| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 61 68 27 |.if test| -f 'ah'|
|00001830| 0a 74 68 65 6e 0a 09 65 | 63 68 6f 20 73 68 61 72 |.then..e|cho shar|
|00001840| 3a 20 77 69 6c 6c 20 6e | 6f 74 20 6f 76 65 72 2d |: will n|ot over-|
|00001850| 77 72 69 74 65 20 65 78 | 69 73 74 69 6e 67 20 66 |write ex|isting f|
|00001860| 69 6c 65 20 22 27 61 68 | 27 22 0a 65 6c 73 65 0a |ile "'ah|'".else.|
|00001870| 63 61 74 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |cat << \|SHAR_EOF|
|00001880| 20 3e 20 27 61 68 27 0a | 0a 20 20 20 20 20 20 20 | > 'ah'.|. |
|00001890| 20 20 20 49 66 20 79 6f | 75 27 72 65 20 72 75 6e | If yo|u're run|
|000018a0| 6e 69 6e 67 20 42 65 72 | 6b 65 6c 65 79 20 55 6e |ning Ber|keley Un|
|000018b0| 69 78 2c 20 61 6e 64 20 | 79 6f 75 27 72 65 20 62 |ix, and |you're b|
|000018c0| 6f 72 65 64 0a 20 20 20 | 20 20 20 20 20 20 20 54 |ored. | T|
|000018d0| 79 70 65 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ype the |followin|
|000018e0| 67 20 63 6f 6d 6d 61 6e | 64 20 66 6f 72 20 73 6f |g comman|d for so|
|000018f0| 6d 65 74 68 69 6e 67 20 | 65 6e 6a 6f 79 61 62 6c |mething |enjoyabl|
|00001900| 65 3a 0a 0a 20 20 20 20 | 20 20 20 20 20 20 21 72 |e:.. | !r|
|00001910| 6f 67 75 65 0a 0a 53 48 | 41 52 5f 45 4f 46 0a 66 |ogue..SH|AR_EOF.f|
|00001920| 69 20 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i # end |of overw|
|00001930| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 65 63 68 |riting c|heck.ech|
|00001940| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|00001950| 6e 67 20 22 27 61 72 67 | 32 27 22 20 27 28 39 31 |ng "'arg|2'" '(91|
|00001960| 37 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 69 |7 charac|ters)'.i|
|00001970| 66 20 74 65 73 74 20 2d | 66 20 27 61 72 67 32 27 |f test -|f 'arg2'|
|00001980| 0a 74 68 65 6e 0a 09 65 | 63 68 6f 20 73 68 61 72 |.then..e|cho shar|
|00001990| 3a 20 77 69 6c 6c 20 6e | 6f 74 20 6f 76 65 72 2d |: will n|ot over-|
|000019a0| 77 72 69 74 65 20 65 78 | 69 73 74 69 6e 67 20 66 |write ex|isting f|
|000019b0| 69 6c 65 20 22 27 61 72 | 67 32 27 22 0a 65 6c 73 |ile "'ar|g2'".els|
|000019c0| 65 0a 63 61 74 20 3c 3c | 20 5c 53 48 41 52 5f 45 |e.cat <<| \SHAR_E|
|000019d0| 4f 46 20 3e 20 27 61 72 | 67 32 27 0a 20 20 20 20 |OF > 'ar|g2'. |
|000019e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000019f0| 20 20 20 20 20 20 20 20 | 20 20 20 41 72 67 75 6d | | Argum|
|00001a00| 65 6e 74 73 20 28 63 6f | 6e 74 29 0a 0a 20 20 20 |ents (co|nt).. |
|00001a10| 20 20 20 20 20 4f 6e 63 | 65 20 74 68 65 20 74 65 | Onc|e the te|
|00001a20| 72 6d 69 6e 61 6c 20 74 | 79 70 65 20 20 69 73 20 |rminal t|ype is |
|00001a30| 20 65 73 74 61 62 6c 69 | 73 68 65 64 2c 20 20 74 | establi|shed, t|
|00001a40| 68 65 20 20 72 65 6d 61 | 69 6e 69 6e 67 20 20 61 |he rema|ining a|
|00001a50| 72 67 2d 0a 20 20 20 20 | 20 20 20 20 75 6d 65 6e |rg-. | umen|
|00001a60| 74 73 20 20 61 72 65 20 | 20 69 6e 74 65 72 70 72 |ts are | interpr|
|00001a70| 65 74 65 64 20 20 74 68 | 75 73 3a 20 20 69 66 20 |eted th|us: if |
|00001a80| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 20 62 65 67 |the argu|ment beg|
|00001a90| 69 6e 73 20 77 69 74 68 | 20 61 0a 20 20 20 20 20 |ins with| a. |
|00001aa0| 20 20 20 22 2d 22 2c 20 | 74 68 65 20 72 65 73 74 | "-", |the rest|
|00001ab0| 20 6f 66 20 69 74 20 69 | 73 20 69 6e 74 65 72 70 | of it i|s interp|
|00001ac0| 72 65 74 65 64 20 61 73 | 20 74 68 6f 75 67 68 20 |reted as| though |
|00001ad0| 69 74 20 61 70 70 65 61 | 72 65 64 20 61 66 74 65 |it appea|red afte|
|00001ae0| 72 0a 20 20 20 20 20 20 | 20 20 74 68 65 20 22 6f |r. | the "o|
|00001af0| 22 20 69 6e 20 61 6e 20 | 6f 70 74 69 6f 6e 20 63 |" in an |option c|
|00001b00| 6f 6d 6d 61 6e 64 2e 20 | 20 46 6f 72 20 20 65 78 |ommand. | For ex|
|00001b10| 61 6d 70 6c 65 2c 20 20 | 61 6e 20 20 61 72 67 75 |ample, |an argu|
|00001b20| 6d 65 6e 74 20 20 6f 66 | 0a 20 20 20 20 20 20 20 |ment of|. |
|00001b30| 20 22 2d 77 31 30 22 20 | 20 61 63 74 73 20 20 61 | "-w10" | acts a|
|00001b40| 73 20 20 61 20 63 6f 6d | 6d 61 6e 64 20 22 6f 77 |s a com|mand "ow|
|00001b50| 31 30 22 2e 20 20 4f 6e | 20 74 68 65 20 6f 74 68 |10". On| the oth|
|00001b60| 65 72 20 68 61 6e 64 2c | 20 69 66 20 74 68 65 0a |er hand,| if the.|
|00001b70| 20 20 20 20 20 20 20 20 | 61 72 67 75 6d 65 6e 74 | |argument|
|00001b80| 20 64 6f 65 73 20 6e 6f | 74 20 62 65 67 69 6e 20 | does no|t begin |
|00001b90| 77 69 74 68 20 22 2d 22 | 2c 20 69 74 20 69 73 20 |with "-"|, it is |
|00001ba0| 69 6e 74 65 72 70 72 65 | 74 65 64 20 61 73 20 61 |interpre|ted as a|
|00001bb0| 20 20 66 69 6c 65 0a 20 | 20 20 20 20 20 20 20 6e | file. | n|
|00001bc0| 61 6d 65 20 20 28 70 61 | 74 68 2d 20 20 6e 61 6d |ame (pa|th- nam|
|00001bd0| 65 29 2e 20 20 20 54 68 | 65 20 20 6e 61 6d 65 64 |e). Th|e named|
|00001be0| 20 20 66 69 6c 65 20 20 | 69 73 20 72 65 61 64 20 | file |is read |
|00001bf0| 69 6e 74 6f 20 74 68 65 | 20 65 64 69 74 0a 20 20 |into the| edit. |
|00001c00| 20 20 20 20 20 20 62 75 | 66 66 65 72 2c 20 61 6e | bu|ffer, an|
|00001c10| 64 20 69 74 73 20 6e 61 | 6d 65 20 62 65 63 6f 6d |d its na|me becom|
|00001c20| 65 73 20 74 68 65 20 20 | 72 65 6d 65 6d 62 65 72 |es the |remember|
|00001c30| 65 64 20 20 66 69 6c 65 | 20 20 6e 61 6d 65 2e 20 |ed file| name. |
|00001c40| 20 20 49 66 0a 20 20 20 | 20 20 20 20 20 6d 6f 72 | If. | mor|
|00001c50| 65 20 20 74 68 61 6e 20 | 6f 6e 65 20 66 69 6c 65 |e than |one file|
|00001c60| 20 69 73 20 6e 61 6d 65 | 64 2c 20 74 68 65 20 65 | is name|d, the e|
|00001c70| 64 69 74 20 62 75 66 66 | 65 72 20 77 69 6c 6c 20 |dit buff|er will |
|00001c80| 63 6f 6e 74 61 69 6e 20 | 74 68 65 0a 20 20 20 20 |contain |the. |
|00001c90| 20 20 20 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 | cont|ents of |
|00001ca0| 61 6c 6c 20 74 68 65 20 | 66 69 6c 65 73 2e 20 20 |all the |files. |
|00001cb0| 49 66 20 20 61 6e 20 20 | 65 72 72 6f 72 20 69 73 |If an |error is|
|00001cc0| 20 65 6e 63 6f 75 6e 74 | 65 72 65 64 20 77 68 69 | encount|ered whi|
|00001cd0| 6c 65 0a 20 20 20 20 20 | 20 20 20 69 6e 74 65 72 |le. | inter|
|00001ce0| 70 72 65 74 69 6e 67 20 | 61 72 67 75 6d 65 6e 74 |preting |argument|
|00001cf0| 73 20 28 66 69 6c 65 20 | 6e 6f 74 20 66 6f 75 6e |s (file |not foun|
|00001d00| 64 2c 20 69 6c 6c 65 67 | 61 6c 20 20 6f 70 74 69 |d, illeg|al opti|
|00001d10| 6f 6e 29 2c 20 20 74 68 | 65 0a 20 20 20 20 20 20 |on), th|e. |
|00001d20| 20 20 72 65 6d 61 69 6e | 64 65 72 20 77 69 6c 6c | remain|der will|
|00001d30| 20 62 65 20 69 67 6e 6f | 72 65 64 2e 0a 0a 20 20 | be igno|red... |
|00001d40| 20 20 20 20 20 20 46 6f | 72 20 69 6e 76 6f 6b 69 | Fo|r invoki|
|00001d50| 6e 67 20 63 6f 6d 6d 61 | 6e 64 20 73 79 6e 74 61 |ng comma|nd synta|
|00001d60| 78 2c 20 74 79 70 65 20 | 22 68 61 72 67 73 22 2e |x, type |"hargs".|
|00001d70| 0a 53 48 41 52 5f 45 4f | 46 0a 66 69 20 23 20 65 |.SHAR_EO|F.fi # e|
|00001d80| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|00001d90| 67 20 63 68 65 63 6b 0a | 65 63 68 6f 20 73 68 61 |g check.|echo sha|
|00001da0| 72 3a 20 65 78 74 72 61 | 63 74 69 6e 67 20 22 27 |r: extra|cting "'|
|00001db0| 61 72 67 73 27 22 20 27 | 28 34 32 35 20 63 68 61 |args'" '|(425 cha|
|00001dc0| 72 61 63 74 65 72 73 29 | 27 0a 69 66 20 74 65 73 |racters)|'.if tes|
|00001dd0| 74 20 2d 66 20 27 61 72 | 67 73 27 0a 74 68 65 6e |t -f 'ar|gs'.then|
|00001de0| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 77 69 6c |..echo s|har: wil|
|00001df0| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|00001e00| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 22 | existin|g file "|
|00001e10| 27 61 72 67 73 27 22 0a | 65 6c 73 65 0a 63 61 74 |'args'".|else.cat|
|00001e20| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|00001e30| 27 61 72 67 73 27 0a 20 | 20 20 20 20 20 20 20 20 |'args'. | |
|00001e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e50| 20 20 20 20 20 41 72 67 | 75 6d 65 6e 74 20 48 61 | Arg|ument Ha|
|00001e60| 6e 64 6c 69 6e 67 0a 0a | 20 20 20 20 20 20 20 20 |ndling..| |
|00001e70| 54 68 65 20 73 79 6e 74 | 61 78 20 66 6f 72 20 27 |The synt|ax for '|
|00001e80| 73 65 27 73 20 69 6e 76 | 6f 6b 69 6e 67 20 63 6f |se's inv|oking co|
|00001e90| 6d 6d 61 6e 64 20 69 73 | 20 75 73 75 61 6c 6c 79 |mmand is| usually|
|00001ea0| 20 67 69 76 65 6e 20 61 | 73 0a 20 20 20 20 20 20 | given a|s. |
|00001eb0| 20 20 20 20 20 20 73 65 | 20 7b 2d 3c 6f 70 74 69 | se| {-<opti|
|00001ec0| 6f 6e 3e 20 7c 20 3c 70 | 61 74 68 6e 61 6d 65 3e |on> | <p|athname>|
|00001ed0| 7d 0a 20 20 20 20 20 20 | 20 20 49 74 20 69 73 20 |}. | It is |
|00001ee0| 73 75 67 67 65 73 74 65 | 64 20 20 74 68 61 74 20 |suggeste|d that |
|00001ef0| 20 79 6f 75 20 20 73 65 | 74 20 75 70 20 61 20 63 | you se|t up a c|
|00001f00| 6f 6d 6d 61 6e 64 20 20 | 66 69 6c 65 20 20 74 68 |ommand |file th|
|00001f10| 61 74 20 20 77 69 6c 6c | 0a 20 20 20 20 20 20 20 |at will|. |
|00001f20| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 69 | automat|ically i|
|00001f30| 6e 76 6f 6b 65 20 27 73 | 65 27 20 77 69 74 68 20 |nvoke 's|e' with |
|00001f40| 74 68 65 20 6f 70 74 69 | 6f 6e 73 20 74 68 61 74 |the opti|ons that|
|00001f50| 20 79 6f 75 20 6c 69 6b | 65 2e 0a 0a 20 20 20 20 | you lik|e... |
|00001f60| 20 20 20 20 54 6f 20 73 | 65 65 20 68 6f 77 20 74 | To s|ee how t|
|00001f70| 68 65 20 72 65 6d 61 69 | 6e 69 6e 67 20 61 72 67 |he remai|ning arg|
|00001f80| 75 6d 65 6e 74 73 20 61 | 72 65 20 74 72 65 61 74 |uments a|re treat|
|00001f90| 65 64 2c 20 74 79 70 65 | 20 22 68 61 72 67 32 22 |ed, type| "harg2"|
|00001fa0| 2e 0a 20 20 20 20 20 20 | 20 20 54 6f 20 72 65 74 |.. | To ret|
|00001fb0| 75 72 6e 20 74 6f 20 74 | 68 65 20 67 65 6e 65 72 |urn to t|he gener|
|00001fc0| 61 6c 20 68 65 6c 70 20 | 64 69 72 65 63 74 6f 72 |al help |director|
|00001fd0| 79 2c 20 74 79 70 65 20 | 22 68 64 69 72 22 2e 0a |y, type |"hdir"..|
|00001fe0| 53 48 41 52 5f 45 4f 46 | 0a 66 69 20 23 20 65 6e |SHAR_EOF|.fi # en|
|00001ff0| 64 20 6f 66 20 6f 76 65 | 72 77 72 69 74 69 6e 67 |d of ove|rwriting|
|00002000| 20 63 68 65 63 6b 0a 65 | 63 68 6f 20 73 68 61 72 | check.e|cho shar|
|00002010| 3a 20 65 78 74 72 61 63 | 74 69 6e 67 20 22 27 62 |: extrac|ting "'b|
|00002020| 27 22 20 27 28 31 30 30 | 20 63 68 61 72 61 63 74 |'" '(100| charact|
|00002030| 65 72 73 29 27 0a 69 66 | 20 74 65 73 74 20 2d 66 |ers)'.if| test -f|
|00002040| 20 27 62 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 | 'b'.the|n..echo |
|00002050| 73 68 61 72 3a 20 77 69 | 6c 6c 20 6e 6f 74 20 6f |shar: wi|ll not o|
|00002060| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00002070| 6e 67 20 66 69 6c 65 20 | 22 27 62 27 22 0a 65 6c |ng file |"'b'".el|
|00002080| 73 65 0a 63 61 74 20 3c | 3c 20 5c 53 48 41 52 5f |se.cat <|< \SHAR_|
|00002090| 45 4f 46 20 3e 20 27 62 | 27 0a 0a 0a 0a 20 20 20 |EOF > 'b|'.... |
|000020a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 54 68 65 72 | | Ther|
|000020b0| 65 20 69 73 20 6e 6f 20 | 22 62 22 20 63 6f 6d 6d |e is no |"b" comm|
|000020c0| 61 6e 64 2e 0a 20 20 20 | 54 6f 20 72 65 74 75 72 |and.. |To retur|
|000020d0| 6e 20 74 6f 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |n to the| command|
|000020e0| 20 64 69 72 65 63 74 6f | 72 79 2c 20 74 79 70 65 | directo|ry, type|
|000020f0| 20 22 68 63 6f 6d 64 69 | 72 2e 22 0a 0a 0a 53 48 | "hcomdi|r."...SH|
|00002100| 41 52 5f 45 4f 46 0a 66 | 69 20 23 20 65 6e 64 20 |AR_EOF.f|i # end |
|00002110| 6f 66 20 6f 76 65 72 77 | 72 69 74 69 6e 67 20 63 |of overw|riting c|
|00002120| 68 65 63 6b 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |heck.ech|o shar: |
|00002130| 65 78 74 72 61 63 74 69 | 6e 67 20 22 27 62 61 6e |extracti|ng "'ban|
|00002140| 67 27 22 20 27 28 33 35 | 30 20 63 68 61 72 61 63 |g'" '(35|0 charac|
|00002150| 74 65 72 73 29 27 0a 69 | 66 20 74 65 73 74 20 2d |ters)'.i|f test -|
|00002160| 66 20 27 62 61 6e 67 27 | 0a 74 68 65 6e 0a 09 65 |f 'bang'|.then..e|
|00002170| 63 68 6f 20 73 68 61 72 | 3a 20 77 69 6c 6c 20 6e |cho shar|: will n|
|00002180| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|00002190| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 22 27 62 61 |isting f|ile "'ba|
|000021a0| 6e 67 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |ng'".els|e.cat <<|
|000021b0| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 62 61 | \SHAR_E|OF > 'ba|
|000021c0| 6e 67 27 0a 0a 0a 20 20 | 20 20 20 20 20 20 21 20 |ng'... | ! |
|000021d0| 2d 2d 2d 20 65 78 63 6c | 75 64 65 20 6f 6e 20 6d |--- excl|ude on m|
|000021e0| 61 72 6b 6e 61 6d 65 0a | 0a 20 20 20 20 20 20 20 |arkname.|. |
|000021f0| 20 64 65 66 61 75 6c 74 | 20 72 61 6e 67 65 20 20 | default| range |
|00002200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002210| 20 73 79 6e 74 61 78 0a | 20 20 20 20 20 20 20 20 | syntax.| |
|00002220| 20 20 31 2c 24 20 20 20 | 20 20 20 20 20 20 20 20 | 1,$ | |
|00002230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002240| 20 20 21 3c 6d 3e 63 6f | 6d 6d 61 6e 64 0a 20 20 | !<m>co|mmand. |
|00002250| 20 20 20 20 20 20 0a 20 | 20 20 20 20 20 20 20 53 | . | S|
|00002260| 69 6d 69 6c 61 72 20 74 | 6f 20 74 68 65 20 22 78 |imilar t|o the "x|
|00002270| 22 20 70 72 65 66 69 78 | 2c 20 65 78 63 65 70 74 |" prefix|, except|
|00002280| 20 74 68 61 74 20 20 22 | 63 6f 6d 6d 61 6e 64 22 | that "|command"|
|00002290| 20 69 73 20 70 65 72 66 | 6f 72 6d 65 64 0a 20 20 | is perf|ormed. |
|000022a0| 20 20 20 20 20 20 66 6f | 72 20 61 6c 6c 20 6c 69 | fo|r all li|
|000022b0| 6e 65 73 20 69 6e 20 74 | 68 65 20 72 61 6e 67 65 |nes in t|he range|
|000022c0| 20 74 68 61 74 20 64 6f | 20 6e 6f 74 20 68 61 76 | that do| not hav|
|000022d0| 65 20 74 68 65 20 6d 61 | 72 6b 20 6e 61 6d 65 20 |e the ma|rk name |
|000022e0| 3c 6d 3e 2e 0a 0a 20 20 | 20 20 20 20 20 20 54 6f |<m>... | To|
|000022f0| 20 72 65 74 75 72 6e 20 | 74 6f 20 74 68 65 20 63 | return |to the c|
|00002300| 6f 6d 6d 61 6e 64 20 64 | 69 72 65 63 74 6f 72 79 |ommand d|irectory|
|00002310| 2c 20 74 79 70 65 20 22 | 68 63 6f 6d 64 69 72 22 |, type "|hcomdir"|
|00002320| 2e 0a 53 48 41 52 5f 45 | 4f 46 0a 66 69 20 23 20 |..SHAR_E|OF.fi # |
|00002330| 65 6e 64 20 6f 66 20 6f | 76 65 72 77 72 69 74 69 |end of o|verwriti|
|00002340| 6e 67 20 63 68 65 63 6b | 0a 65 63 68 6f 20 73 68 |ng check|.echo sh|
|00002350| 61 72 3a 20 65 78 74 72 | 61 63 74 69 6e 67 20 22 |ar: extr|acting "|
|00002360| 27 62 75 67 27 22 20 27 | 28 34 31 33 20 63 68 61 |'bug'" '|(413 cha|
|00002370| 72 61 63 74 65 72 73 29 | 27 0a 69 66 20 74 65 73 |racters)|'.if tes|
|00002380| 74 20 2d 66 20 27 62 75 | 67 27 0a 74 68 65 6e 0a |t -f 'bu|g'.then.|
|00002390| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 77 69 6c 6c |.echo sh|ar: will|
|000023a0| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|000023b0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 22 27 |existing| file "'|
|000023c0| 62 75 67 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |bug'".el|se.cat <|
|000023d0| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 62 |< \SHAR_|EOF > 'b|
|000023e0| 75 67 27 0a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ug'.. | |
|000023f0| 20 54 68 65 72 65 20 69 | 73 20 61 20 6c 69 6d 69 | There i|s a limi|
|00002400| 74 20 28 4d 41 58 4c 49 | 4e 45 20 2d 20 32 29 20 |t (MAXLI|NE - 2) |
|00002410| 6f 6e 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |on the n|umber of|
|00002420| 20 63 68 61 72 61 63 74 | 65 72 73 0a 20 20 20 20 | charact|ers. |
|00002430| 20 20 20 20 69 6e 20 61 | 20 6c 69 6e 65 2e 20 53 | in a| line. S|
|00002440| 65 27 73 20 4d 41 58 4c | 49 4e 45 20 69 73 20 63 |e's MAXL|INE is c|
|00002450| 75 72 72 65 6e 74 6c 79 | 20 35 31 32 2c 20 73 6f |urrently| 512, so|
|00002460| 20 74 68 69 73 20 69 73 | 6e 27 74 20 74 6f 6f 20 | this is|n't too |
|00002470| 6d 75 63 68 0a 20 20 20 | 20 20 20 20 20 6f 66 20 |much. | of |
|00002480| 61 20 70 72 6f 62 6c 65 | 6d 2e 0a 20 20 20 20 20 |a proble|m.. |
|00002490| 20 20 20 20 20 20 20 49 | 66 20 61 20 66 69 6c 65 | I|f a file|
|000024a0| 6e 61 6d 65 20 69 73 20 | 61 62 73 65 6e 74 20 77 |name is |absent w|
|000024b0| 68 65 6e 20 69 6e 76 6f | 6b 65 64 2c 20 61 6c 6c |hen invo|ked, all|
|000024c0| 20 6f 66 20 74 68 65 0a | 20 20 20 20 20 20 20 20 | of the.| |
|000024d0| 6f 70 74 69 6f 6e 73 20 | 61 72 65 20 6e 6f 74 20 |options |are not |
|000024e0| 70 72 6f 63 65 73 73 65 | 64 2e 0a 0a 0a 20 20 20 |processe|d.... |
|000024f0| 20 20 20 20 20 54 6f 20 | 67 6f 20 61 6c 6c 20 74 | To |go all t|
|00002500| 68 65 20 77 61 79 20 62 | 61 63 6b 20 74 6f 20 74 |he way b|ack to t|
|00002510| 68 65 20 67 65 6e 65 72 | 61 6c 20 68 65 6c 70 20 |he gener|al help |
|00002520| 64 69 73 70 6c 61 79 2c | 20 74 79 70 65 20 22 68 |display,| type "h|
|00002530| 22 2e 20 20 20 20 0a 20 | 20 20 20 20 20 20 20 54 |". . | T|
|00002540| 6f 20 67 6f 20 62 61 63 | 6b 20 74 6f 20 74 68 65 |o go bac|k to the|
|00002550| 20 67 65 6e 65 72 61 6c | 20 68 65 6c 70 20 64 69 | general| help di|
|00002560| 72 65 63 74 6f 72 79 2c | 20 74 79 70 65 20 22 68 |rectory,| type "h|
|00002570| 64 69 72 2e 22 20 20 20 | 20 20 20 20 20 20 20 20 |dir." | |
|00002580| 0a 53 48 41 52 5f 45 4f | 46 0a 66 69 20 23 20 65 |.SHAR_EO|F.fi # e|
|00002590| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|000025a0| 67 20 63 68 65 63 6b 0a | 65 63 68 6f 20 73 68 61 |g check.|echo sha|
|000025b0| 72 3a 20 65 78 74 72 61 | 63 74 69 6e 67 20 22 27 |r: extra|cting "'|
|000025c0| 63 27 22 20 27 28 36 31 | 39 20 63 68 61 72 61 63 |c'" '(61|9 charac|
|000025d0| 74 65 72 73 29 27 0a 69 | 66 20 74 65 73 74 20 2d |ters)'.i|f test -|
|000025e0| 66 20 27 63 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |f 'c'.th|en..echo|
|000025f0| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|00002600| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00002610| 69 6e 67 20 66 69 6c 65 | 20 22 27 63 27 22 0a 65 |ing file| "'c'".e|
|00002620| 6c 73 65 0a 63 61 74 20 | 3c 3c 20 5c 53 48 41 52 |lse.cat |<< \SHAR|
|00002630| 5f 45 4f 46 20 3e 20 27 | 63 27 0a 20 20 20 20 20 |_EOF > '|c'. |
|00002640| 20 20 20 20 20 63 20 20 | 20 20 2d 2d 20 43 68 61 | c | -- Cha|
|00002650| 6e 67 65 20 63 6f 6d 6d | 61 6e 64 0a 0a 20 20 20 |nge comm|and.. |
|00002660| 20 20 20 20 20 20 20 20 | 20 20 20 20 64 65 66 61 | | defa|
|00002670| 75 6c 74 20 72 61 6e 67 | 65 20 20 20 20 20 20 20 |ult rang|e |
|00002680| 20 20 20 20 73 79 6e 74 | 61 78 0a 20 20 20 20 20 | synt|ax. |
|00002690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2e | | .|
|000026a0| 2c 2e 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,. | |
|000026b0| 20 20 20 20 63 0a 0a 20 | 20 20 20 20 20 20 20 22 | c.. | "|
|000026c0| 63 22 20 20 66 69 72 73 | 74 20 20 64 65 6c 65 74 |c" firs|t delet|
|000026d0| 65 73 20 20 74 68 65 20 | 72 61 6e 67 65 20 6f 66 |es the |range of|
|000026e0| 20 6c 69 6e 65 73 20 64 | 65 74 65 72 6d 69 6e 65 | lines d|etermine|
|000026f0| 64 20 62 79 20 74 68 65 | 20 6c 69 6e 65 0a 20 20 |d by the| line. |
|00002700| 20 20 20 20 20 20 6e 75 | 6d 62 65 72 73 20 28 64 | nu|mbers (d|
|00002710| 65 66 61 75 6c 74 20 22 | 2e 2c 2e 22 29 2c 20 74 |efault "|.,."), t|
|00002720| 68 65 6e 20 65 6e 74 65 | 72 73 20 61 70 70 65 6e |hen ente|rs appen|
|00002730| 64 20 6d 6f 64 65 20 73 | 6f 20 20 74 68 61 74 20 |d mode s|o that |
|00002740| 20 79 6f 75 0a 20 20 20 | 20 20 20 20 20 63 61 6e | you. | can|
|00002750| 20 20 74 79 70 65 20 20 | 6c 69 6e 65 73 20 74 6f | type |lines to|
|00002760| 20 72 65 70 6c 61 63 65 | 20 74 68 65 20 64 65 6c | replace| the del|
|00002770| 65 74 65 64 20 6c 69 6e | 65 73 2e 20 20 41 70 70 |eted lin|es. App|
|00002780| 65 6e 64 20 6d 6f 64 65 | 20 69 73 0a 20 20 20 20 |end mode| is. |
|00002790| 20 20 20 20 74 65 72 6d | 69 6e 61 74 65 64 20 77 | term|inated w|
|000027a0| 69 74 68 20 61 20 64 6f | 74 20 6f 6e 20 61 20 6c |ith a do|t on a l|
|000027b0| 69 6e 65 20 62 79 20 69 | 74 73 65 6c 66 2c 20 61 |ine by i|tself, a|
|000027c0| 73 20 77 69 74 68 20 74 | 68 65 20 20 41 70 70 65 |s with t|he Appe|
|000027d0| 6e 64 0a 20 20 20 20 20 | 20 20 20 63 6f 6d 6d 61 |nd. | comma|
|000027e0| 6e 64 2e 20 22 63 3a 22 | 20 77 6f 72 6b 73 20 61 |nd. "c:"| works a|
|000027f0| 73 20 61 20 6f 6e 65 20 | 6c 69 6e 65 20 63 68 61 |s a one |line cha|
|00002800| 6e 67 65 20 28 69 2e 65 | 2e 20 77 68 61 74 20 20 |nge (i.e|. what |
|00002810| 69 73 20 20 61 66 74 65 | 72 0a 20 20 20 20 20 20 |is afte|r. |
|00002820| 20 20 74 68 65 20 63 6f | 6c 6f 6e 20 72 65 70 6c | the co|lon repl|
|00002830| 61 63 65 73 20 74 68 65 | 20 63 75 72 72 65 6e 74 |aces the| current|
|00002840| 20 6c 69 6e 65 29 2e 0a | 0a 20 20 20 20 20 20 20 | line)..|. |
|00002850| 20 54 6f 20 72 65 74 75 | 72 6e 20 74 6f 20 74 68 | To retu|rn to th|
|00002860| 65 20 63 6f 6d 6d 61 6e | 64 20 64 69 72 65 63 74 |e comman|d direct|
|00002870| 6f 72 79 2c 20 74 79 70 | 65 20 22 68 63 6f 6d 64 |ory, typ|e "hcomd|
|00002880| 69 72 2e 22 0a 20 20 20 | 20 20 20 20 20 53 65 65 |ir.". | See|
|00002890| 20 61 6c 73 6f 20 20 20 | 22 68 61 22 20 61 6e 64 | also |"ha" and|
|000028a0| 20 22 68 64 22 0a 53 48 | 41 52 5f 45 4f 46 0a 66 | "hd".SH|AR_EOF.f|
|000028b0| 69 20 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i # end |of overw|
|000028c0| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 65 63 68 |riting c|heck.ech|
|000028d0| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|000028e0| 6e 67 20 22 27 63 63 27 | 22 20 27 28 37 34 37 20 |ng "'cc'|" '(747 |
|000028f0| 63 68 61 72 61 63 74 65 | 72 73 29 27 0a 69 66 20 |characte|rs)'.if |
|00002900| 74 65 73 74 20 2d 66 20 | 27 63 63 27 0a 74 68 65 |test -f |'cc'.the|
|00002910| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 77 69 |n..echo |shar: wi|
|00002920| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00002930| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00002940| 22 27 63 63 27 22 0a 65 | 6c 73 65 0a 63 61 74 20 |"'cc'".e|lse.cat |
|00002950| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00002960| 63 63 27 0a 0a 20 20 20 | 20 20 20 20 20 43 6f 6e |cc'.. | Con|
|00002970| 74 72 6f 6c 20 63 68 61 | 72 61 63 74 65 72 73 20 |trol cha|racters |
|00002980| 63 61 6e 20 62 65 20 75 | 73 65 64 20 66 6f 72 20 |can be u|sed for |
|00002990| 63 6f 72 72 65 63 74 69 | 6e 67 20 74 79 70 69 6e |correcti|ng typin|
|000029a0| 67 20 6d 69 73 74 61 6b | 65 73 2c 0a 20 20 20 20 |g mistak|es,. |
|000029b0| 20 20 20 20 66 6f 72 20 | 63 6f 72 72 65 63 74 69 | for |correcti|
|000029c0| 6e 67 20 63 6f 6d 6d 61 | 6e 64 73 20 74 68 61 74 |ng comma|nds that|
|000029d0| 20 68 61 76 65 20 69 6e | 63 75 72 72 65 64 20 61 | have in|curred a|
|000029e0| 6e 20 65 72 72 6f 72 20 | 6d 65 73 73 61 67 65 2c |n error |message,|
|000029f0| 0a 20 20 20 20 20 20 20 | 20 6f 72 20 66 6f 72 20 |. | or for |
|00002a00| 65 64 69 74 69 6e 67 20 | 74 68 65 20 65 64 69 74 |editing |the edit|
|00002a10| 20 62 75 66 66 65 72 20 | 28 22 69 6e 6c 69 6e 65 | buffer |("inline|
|00002a20| 20 65 64 69 74 69 6e 67 | 22 29 20 76 69 61 20 74 | editing|") via t|
|00002a30| 68 65 20 22 76 22 0a 20 | 20 20 20 20 20 20 20 63 |he "v". | c|
|00002a40| 6f 6d 6d 61 6e 64 2e 20 | 20 54 68 65 20 6e 6f 76 |ommand. | The nov|
|00002a50| 69 63 65 20 73 68 6f 75 | 6c 64 20 62 65 20 74 6f |ice shou|ld be to|
|00002a60| 6c 64 20 72 69 67 68 74 | 20 61 77 61 79 20 74 68 |ld right| away th|
|00002a70| 61 74 20 68 69 74 74 69 | 6e 67 0a 20 20 20 20 20 |at hitti|ng. |
|00002a80| 20 20 20 74 68 65 20 44 | 45 4c 20 6f 72 20 52 55 | the D|EL or RU|
|00002a90| 42 4f 55 54 20 6b 65 79 | 20 69 73 20 61 20 77 61 |BOUT key| is a wa|
|00002aa0| 79 20 74 6f 20 65 72 61 | 73 65 20 61 6e 20 65 72 |y to era|se an er|
|00002ab0| 72 6f 6e 65 6f 75 73 20 | 63 6f 6d 6d 61 6e 64 2e |roneous |command.|
|00002ac0| 0a 0a 20 20 20 20 20 20 | 20 20 47 65 6e 65 72 61 |.. | Genera|
|00002ad0| 6c 20 48 65 6c 70 20 44 | 69 72 65 63 74 6f 72 79 |l Help D|irectory|
|00002ae0| 2e 20 2e 20 2e 20 2e 20 | 2e 20 2e 20 2e 20 2e 20 |. . . . |. . . . |
|00002af0| 2e 20 2e 20 2e 20 2e 20 | 2e 20 2e 20 68 64 69 72 |. . . . |. . hdir|
|00002b00| 0a 20 20 20 20 20 20 20 | 20 4f 74 68 65 72 20 43 |. | Other C|
|00002b10| 6f 6e 74 72 6f 6c 20 43 | 68 61 72 61 63 74 65 72 |ontrol C|haracter|
|00002b20| 73 2e 20 2e 20 2e 20 2e | 20 2e 20 2e 20 2e 20 2e |s. . . .| . . . .|
|00002b30| 20 2e 20 2e 20 2e 20 2e | 20 2e 20 68 63 63 6d 69 | . . . .| . hccmi|
|00002b40| 73 63 0a 20 20 20 20 20 | 20 20 20 43 68 61 72 61 |sc. | Chara|
|00002b50| 63 74 65 72 20 49 6e 73 | 65 72 74 69 6f 6e 20 43 |cter Ins|ertion C|
|00002b60| 6f 6e 74 72 6f 6c 20 43 | 68 61 72 61 63 74 65 72 |ontrol C|haracter|
|00002b70| 73 2e 20 2e 20 2e 20 2e | 20 2e 20 2e 20 68 63 68 |s. . . .| . . hch|
|00002b80| 61 72 69 6e 73 0a 20 20 | 20 20 20 20 20 20 54 65 |arins. | Te|
|00002b90| 72 6d 69 6e 61 74 69 6f | 6e 20 43 6f 6e 74 72 6f |rminatio|n Contro|
|00002ba0| 6c 20 43 68 61 72 61 63 | 74 65 72 73 2e 20 2e 20 |l Charac|ters. . |
|00002bb0| 2e 20 2e 20 2e 20 2e 20 | 2e 20 2e 20 2e 20 2e 20 |. . . . |. . . . |
|00002bc0| 68 74 65 72 6d 63 68 61 | 72 0a 20 20 20 20 20 20 |htermcha|r. |
|00002bd0| 20 20 43 68 61 72 61 63 | 74 65 72 20 44 65 6c 65 | Charac|ter Dele|
|00002be0| 74 69 6f 6e 20 43 6f 6e | 74 72 6f 6c 20 43 68 61 |tion Con|trol Cha|
|00002bf0| 72 61 63 74 65 72 73 20 | 2e 20 2e 20 2e 20 2e 20 |racters |. . . . |
|00002c00| 2e 20 2e 20 68 63 68 61 | 72 64 65 6c 0a 20 20 20 |. . hcha|rdel. |
|00002c10| 20 20 20 20 20 43 75 72 | 73 6f 72 20 4d 6f 74 69 | Cur|sor Moti|
|00002c20| 6f 6e 20 43 6f 6e 74 72 | 6f 6c 20 43 68 61 72 61 |on Contr|ol Chara|
|00002c30| 63 74 65 72 73 2e 20 2e | 20 2e 20 2e 20 2e 20 2e |cters. .| . . . .|
|00002c40| 20 2e 20 2e 20 2e 20 68 | 6d 6f 74 69 6f 6e 0a 53 | . . . h|motion.S|
|00002c50| 48 41 52 5f 45 4f 46 0a | 66 69 20 23 20 65 6e 64 |HAR_EOF.|fi # end|
|00002c60| 20 6f 66 20 6f 76 65 72 | 77 72 69 74 69 6e 67 20 | of over|writing |
|00002c70| 63 68 65 63 6b 0a 65 63 | 68 6f 20 73 68 61 72 3a |check.ec|ho shar:|
|00002c80| 20 65 78 74 72 61 63 74 | 69 6e 67 20 22 27 63 63 | extract|ing "'cc|
|00002c90| 6d 69 73 63 27 22 20 27 | 28 34 31 35 20 63 68 61 |misc'" '|(415 cha|
|00002ca0| 72 61 63 74 65 72 73 29 | 27 0a 69 66 20 74 65 73 |racters)|'.if tes|
|00002cb0| 74 20 2d 66 20 27 63 63 | 6d 69 73 63 27 0a 74 68 |t -f 'cc|misc'.th|
|00002cc0| 65 6e 0a 09 65 63 68 6f | 20 73 68 61 72 3a 20 77 |en..echo| shar: w|
|00002cd0| 69 6c 6c 20 6e 6f 74 20 | 6f 76 65 72 2d 77 72 69 |ill not |over-wri|
|00002ce0| 74 65 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |te exist|ing file|
|00002cf0| 20 22 27 63 63 6d 69 73 | 63 27 22 0a 65 6c 73 65 | "'ccmis|c'".else|
|00002d00| 0a 63 61 74 20 3c 3c 20 | 5c 53 48 41 52 5f 45 4f |.cat << |\SHAR_EO|
|00002d10| 46 20 3e 20 27 63 63 6d | 69 73 63 27 0a 20 20 20 |F > 'ccm|isc'. |
|00002d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d30| 20 20 20 20 4d 69 73 63 | 65 6c 6c 61 6e 65 6f 75 | Misc|ellaneou|
|00002d40| 73 20 43 6f 6e 74 72 6f | 6c 20 43 68 61 72 61 63 |s Contro|l Charac|
|00002d50| 74 65 72 73 0a 0a 20 20 | 20 20 20 20 20 20 20 43 |ters.. | C|
|00002d60| 54 52 4c 2d 5a 20 74 6f | 67 67 6c 65 73 20 61 6e |TRL-Z to|ggles an|
|00002d70| 20 69 6e 64 69 63 61 74 | 6f 72 20 74 68 61 74 20 | indicat|or that |
|00002d80| 61 63 74 73 20 61 73 20 | 61 20 22 73 68 69 66 74 |acts as |a "shift|
|00002d90| 20 6c 6f 63 6b 22 2c 0a | 20 20 20 20 20 20 20 20 | lock",.| |
|00002da0| 20 63 6f 6e 74 72 6f 6c | 6c 69 6e 67 20 63 61 73 | control|ling cas|
|00002db0| 65 20 6d 61 70 70 69 6e | 67 20 6f 6e 20 61 6c 70 |e mappin|g on alp|
|00002dc0| 68 61 62 65 74 69 63 73 | 20 74 79 70 65 64 2e 0a |habetics| typed..|
|00002dd0| 0a 20 20 20 20 20 20 20 | 20 20 43 54 52 4c 2d 51 |. | CTRL-Q|
|00002de0| 20 73 69 67 6e 61 6c 73 | 20 74 68 65 20 65 64 69 | signals| the edi|
|00002df0| 74 6f 72 20 74 68 61 74 | 20 79 6f 75 20 73 75 73 |tor that| you sus|
|00002e00| 70 65 63 74 20 74 68 61 | 74 20 66 6f 72 20 73 6f |pect tha|t for so|
|00002e10| 6d 65 0a 20 20 20 20 20 | 20 20 20 20 72 65 61 73 |me. | reas|
|00002e20| 6f 6e 20 74 68 65 20 73 | 63 72 65 65 6e 20 69 73 |on the s|creen is|
|00002e30| 20 67 61 72 62 61 67 65 | 64 2e 20 20 54 68 65 20 | garbage|d. The |
|00002e40| 72 65 73 70 6f 6e 73 65 | 20 69 73 20 74 6f 20 63 |response| is to c|
|00002e50| 6c 65 61 72 20 61 6e 64 | 0a 20 20 20 20 20 20 20 |lear and|. |
|00002e60| 20 20 72 65 73 74 6f 72 | 65 20 74 68 65 20 73 63 | restor|e the sc|
|00002e70| 72 65 65 6e 2e 0a 0a 0a | 20 20 20 20 20 20 20 20 |reen....| |
|00002e80| 20 54 79 70 65 20 22 68 | 63 63 22 20 74 6f 20 67 | Type "h|cc" to g|
|00002e90| 65 74 20 62 61 63 6b 20 | 74 6f 20 74 68 65 20 63 |et back |to the c|
|00002ea0| 6f 6e 74 72 6f 6c 20 63 | 68 61 72 61 63 74 65 72 |ontrol c|haracter|
|00002eb0| 20 64 69 72 65 63 74 6f | 72 79 2e 0a 53 48 41 52 | directo|ry..SHAR|
|00002ec0| 5f 45 4f 46 0a 66 69 20 | 23 20 65 6e 64 20 6f 66 |_EOF.fi |# end of|
|00002ed0| 20 6f 76 65 72 77 72 69 | 74 69 6e 67 20 63 68 65 | overwri|ting che|
|00002ee0| 63 6b 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 65 78 |ck.echo |shar: ex|
|00002ef0| 74 72 61 63 74 69 6e 67 | 20 22 27 63 68 61 72 64 |tracting| "'chard|
|00002f00| 65 6c 27 22 20 27 28 34 | 38 31 20 63 68 61 72 61 |el'" '(4|81 chara|
|00002f10| 63 74 65 72 73 29 27 0a | 69 66 20 74 65 73 74 20 |cters)'.|if test |
|00002f20| 2d 66 20 27 63 68 61 72 | 64 65 6c 27 0a 74 68 65 |-f 'char|del'.the|
|00002f30| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 77 69 |n..echo |shar: wi|
|00002f40| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00002f50| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00002f60| 22 27 63 68 61 72 64 65 | 6c 27 22 0a 65 6c 73 65 |"'charde|l'".else|
|00002f70| 0a 63 61 74 20 3c 3c 20 | 5c 53 48 41 52 5f 45 4f |.cat << |\SHAR_EO|
|00002f80| 46 20 3e 20 27 63 68 61 | 72 64 65 6c 27 0a 20 20 |F > 'cha|rdel'. |
|00002f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002fa0| 20 20 43 68 61 72 61 63 | 74 65 72 20 44 65 6c 65 | Charac|ter Dele|
|00002fb0| 74 69 6f 6e 20 43 6f 6e | 74 72 6f 6c 20 43 68 61 |tion Con|trol Cha|
|00002fc0| 72 61 63 74 65 72 73 0a | 20 20 20 20 20 20 20 20 |racters.| |
|00002fd0| 47 6f 62 62 6c 65 20 6f | 6e 65 20 63 68 61 72 61 |Gobble o|ne chara|
|00002fe0| 63 74 65 72 0a 20 20 20 | 20 20 20 20 20 20 20 74 |cter. | t|
|00002ff0| 6f 20 6c 65 66 74 20 6f | 66 20 63 75 72 73 6f 72 |o left o|f cursor|
|00003000| 20 20 20 20 20 20 20 20 | 20 20 43 54 52 4c 2d 55 | | CTRL-U|
|00003010| 0a 20 20 20 20 20 20 20 | 20 20 20 61 74 20 63 75 |. | at cu|
|00003020| 72 73 6f 72 20 20 20 20 | 20 20 20 20 20 20 20 20 |rsor | |
|00003030| 20 20 20 20 20 20 43 54 | 52 4c 2d 52 0a 20 20 20 | CT|RL-R. |
|00003040| 20 20 20 20 20 47 6f 62 | 62 6c 65 20 61 6c 6c 20 | Gob|ble all |
|00003050| 63 68 61 72 61 63 74 65 | 72 73 0a 20 20 20 20 20 |characte|rs. |
|00003060| 20 20 20 20 20 74 6f 20 | 6c 65 66 74 20 6f 66 20 | to |left of |
|00003070| 63 75 72 73 6f 72 20 20 | 20 20 20 20 20 20 20 20 |cursor | |
|00003080| 43 54 52 4c 2d 59 0a 20 | 20 20 20 20 20 20 20 20 |CTRL-Y. | |
|00003090| 20 61 74 20 61 6e 64 20 | 74 6f 20 72 69 67 68 74 | at and |to right|
|000030a0| 20 6f 66 20 63 75 72 73 | 6f 72 20 20 43 54 52 4c | of curs|or CTRL|
|000030b0| 2d 54 0a 20 20 20 20 20 | 20 20 20 20 20 6f 6e 20 |-T. | on |
|000030c0| 65 6e 74 69 72 65 20 6c | 69 6e 65 20 20 20 20 20 |entire l|ine |
|000030d0| 20 20 20 20 20 20 20 20 | 44 45 4c 20 28 61 2e 20 | |DEL (a. |
|000030e0| 6b 2e 20 61 2e 20 52 55 | 42 4f 55 54 29 0a 0a 0a |k. a. RU|BOUT)...|
|000030f0| 20 20 20 20 20 20 20 20 | 22 68 64 69 72 22 20 67 | |"hdir" g|
|00003100| 65 74 73 20 79 6f 75 20 | 62 61 63 6b 20 74 6f 20 |ets you |back to |
|00003110| 74 68 65 20 67 65 6e 65 | 72 61 6c 20 68 65 6c 70 |the gene|ral help|
|00003120| 20 64 69 72 65 63 74 6f | 72 79 2e 0a 20 20 20 20 | directo|ry.. |
|00003130| 20 20 20 20 54 79 70 65 | 20 22 68 63 63 22 20 74 | Type| "hcc" t|
|00003140| 6f 20 67 65 74 20 62 61 | 63 6b 20 74 6f 20 74 68 |o get ba|ck to th|
|00003150| 65 20 63 6f 6e 74 72 6f | 6c 20 63 68 61 72 61 63 |e contro|l charac|
|00003160| 74 65 72 20 64 69 72 65 | 63 74 6f 72 79 2e 0a 53 |ter dire|ctory..S|
|00003170| 48 41 52 5f 45 4f 46 0a | 66 69 20 23 20 65 6e 64 |HAR_EOF.|fi # end|
|00003180| 20 6f 66 20 6f 76 65 72 | 77 72 69 74 69 6e 67 20 | of over|writing |
|00003190| 63 68 65 63 6b 0a 65 63 | 68 6f 20 73 68 61 72 3a |check.ec|ho shar:|
|000031a0| 20 65 78 74 72 61 63 74 | 69 6e 67 20 22 27 63 68 | extract|ing "'ch|
|000031b0| 61 72 69 6e 73 27 22 20 | 27 28 36 32 30 20 63 68 |arins'" |'(620 ch|
|000031c0| 61 72 61 63 74 65 72 73 | 29 27 0a 69 66 20 74 65 |aracters|)'.if te|
|000031d0| 73 74 20 2d 66 20 27 63 | 68 61 72 69 6e 73 27 0a |st -f 'c|harins'.|
|000031e0| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|000031f0| 20 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 | will no|t over-w|
|00003200| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|00003210| 6c 65 20 22 27 63 68 61 | 72 69 6e 73 27 22 0a 65 |le "'cha|rins'".e|
|00003220| 6c 73 65 0a 63 61 74 20 | 3c 3c 20 5c 53 48 41 52 |lse.cat |<< \SHAR|
|00003230| 5f 45 4f 46 20 3e 20 27 | 63 68 61 72 69 6e 73 27 |_EOF > '|charins'|
|00003240| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003250| 20 20 20 20 20 43 68 61 | 72 61 63 74 65 72 20 49 | Cha|racter I|
|00003260| 6e 73 65 72 74 69 6f 6e | 20 43 6f 6e 74 72 6f 6c |nsertion| Control|
|00003270| 20 43 68 61 72 61 63 74 | 65 72 73 0a 0a 20 20 20 | Charact|ers.. |
|00003280| 20 20 20 20 20 43 54 52 | 4c 2d 43 20 69 6e 73 65 | CTR|L-C inse|
|00003290| 72 74 73 20 61 20 62 6c | 61 6e 6b 20 61 74 20 74 |rts a bl|ank at t|
|000032a0| 68 65 20 63 75 72 73 6f | 72 20 70 6f 73 69 74 69 |he curso|r positi|
|000032b0| 6f 6e 2e 0a 20 20 20 20 | 20 20 20 20 43 54 52 4c |on.. | CTRL|
|000032c0| 2d 58 20 69 6e 73 65 72 | 74 73 20 62 6c 61 6e 6b |-X inser|ts blank|
|000032d0| 73 20 74 6f 20 74 68 65 | 20 6e 65 78 74 20 74 61 |s to the| next ta|
|000032e0| 62 20 73 74 6f 70 20 61 | 74 20 74 68 65 20 63 75 |b stop a|t the cu|
|000032f0| 72 73 6f 72 20 70 6f 73 | 69 74 69 6f 6e 2e 0a 20 |rsor pos|ition.. |
|00003300| 20 20 20 20 20 20 20 43 | 54 52 4c 2d 41 20 74 6f | C|TRL-A to|
|00003310| 67 67 6c 65 73 20 49 6e | 73 65 72 74 20 4d 6f 64 |ggles In|sert Mod|
|00003320| 65 2e 0a 0a 20 20 20 20 | 20 20 20 20 57 68 65 6e |e... | When|
|00003330| 20 49 6e 73 65 72 74 20 | 4d 6f 64 65 20 69 73 20 | Insert |Mode is |
|00003340| 69 6e 20 65 66 66 65 63 | 74 2c 20 61 6e 79 20 70 |in effec|t, any p|
|00003350| 72 69 6e 74 69 6e 67 20 | 63 68 61 72 61 63 74 65 |rinting |characte|
|00003360| 72 20 74 79 70 65 64 20 | 69 73 0a 20 20 20 20 20 |r typed |is. |
|00003370| 20 20 20 69 6e 73 65 72 | 74 65 64 20 69 6e 74 6f | inser|ted into|
|00003380| 20 74 68 65 20 6c 69 6e | 65 2c 20 77 69 74 68 20 | the lin|e, with |
|00003390| 63 68 61 72 61 63 74 65 | 72 73 20 61 74 20 61 6e |characte|rs at an|
|000033a0| 64 20 74 6f 20 74 68 65 | 20 72 69 67 68 74 20 6f |d to the| right o|
|000033b0| 66 0a 20 20 20 20 20 20 | 20 20 74 68 65 20 63 75 |f. | the cu|
|000033c0| 72 73 6f 72 20 6d 6f 76 | 69 6e 67 20 6f 76 65 72 |rsor mov|ing over|
|000033d0| 20 74 6f 20 6d 61 6b 65 | 20 72 6f 6f 6d 2e 20 20 | to make| room. |
|000033e0| 57 68 65 6e 20 49 6e 73 | 65 72 74 20 4d 6f 64 65 |When Ins|ert Mode|
|000033f0| 20 69 73 20 20 6e 6f 74 | 0a 20 20 20 20 20 20 20 | is not|. |
|00003400| 20 69 6e 20 65 66 66 65 | 63 74 2c 20 61 6e 79 20 | in effe|ct, any |
|00003410| 70 72 69 6e 74 69 6e 67 | 20 63 68 61 72 61 63 74 |printing| charact|
|00003420| 65 72 20 74 79 70 65 64 | 20 77 69 6c 6c 20 72 65 |er typed| will re|
|00003430| 70 6c 61 63 65 20 28 6f | 76 65 72 6c 61 79 29 0a |place (o|verlay).|
|00003440| 20 20 20 20 20 20 20 20 | 74 68 65 20 63 68 61 72 | |the char|
|00003450| 61 63 74 65 72 20 61 74 | 20 74 68 65 20 63 75 72 |acter at| the cur|
|00003460| 73 6f 72 2e 0a 0a 0a 20 | 20 20 20 20 20 20 20 54 |sor.... | T|
|00003470| 6f 20 72 65 74 75 72 6e | 20 74 6f 20 74 68 65 20 |o return| to the |
|00003480| 64 69 72 65 63 74 6f 72 | 79 20 6f 66 20 63 6f 6e |director|y of con|
|00003490| 74 72 6f 6c 20 63 68 61 | 72 61 63 74 65 72 73 2c |trol cha|racters,|
|000034a0| 20 74 79 70 65 20 22 68 | 63 63 22 2e 0a 53 48 41 | type "h|cc"..SHA|
|000034b0| 52 5f 45 4f 46 0a 66 69 | 20 23 20 65 6e 64 20 6f |R_EOF.fi| # end o|
|000034c0| 66 20 6f 76 65 72 77 72 | 69 74 69 6e 67 20 63 68 |f overwr|iting ch|
|000034d0| 65 63 6b 0a 65 63 68 6f | 20 73 68 61 72 3a 20 65 |eck.echo| shar: e|
|000034e0| 78 74 72 61 63 74 69 6e | 67 20 22 27 63 6f 6c 6f |xtractin|g "'colo|
|000034f0| 6e 27 22 20 27 28 33 35 | 35 20 63 68 61 72 61 63 |n'" '(35|5 charac|
|00003500| 74 65 72 73 29 27 0a 69 | 66 20 74 65 73 74 20 2d |ters)'.i|f test -|
|00003510| 66 20 27 63 6f 6c 6f 6e | 27 0a 74 68 65 6e 0a 09 |f 'colon|'.then..|
|00003520| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|00003530| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00003540| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 63 |xisting |file "'c|
|00003550| 6f 6c 6f 6e 27 22 0a 65 | 6c 73 65 0a 63 61 74 20 |olon'".e|lse.cat |
|00003560| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00003570| 63 6f 6c 6f 6e 27 0a 20 | 20 20 20 20 20 20 20 20 |colon'. | |
|00003580| 3a 20 20 20 20 2d 2d 20 | 50 61 67 65 20 63 6f 6d |: -- |Page com|
|00003590| 6d 61 6e 64 0a 0a 20 20 | 20 20 20 20 20 20 20 20 |mand.. | |
|000035a0| 20 20 20 20 64 65 66 61 | 75 6c 74 20 72 61 6e 67 | defa|ult rang|
|000035b0| 65 20 20 20 20 20 20 20 | 20 20 20 20 73 79 6e 74 |e | synt|
|000035c0| 61 78 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ax. | |
|000035d0| 20 20 20 20 20 20 20 2e | 20 20 20 20 20 20 20 20 | .| |
|000035e0| 20 20 20 20 20 20 20 20 | 20 3a 0a 0a 20 20 20 20 | | :.. |
|000035f0| 20 20 22 3a 22 20 69 73 | 20 66 6f 72 20 70 61 67 | ":" is| for pag|
|00003600| 69 6e 67 20 74 68 65 20 | 61 63 74 69 76 65 20 61 |ing the |active a|
|00003610| 72 65 61 20 6f 6e 65 20 | 70 61 67 65 20 28 6e 2d |rea one |page (n-|
|00003620| 31 20 6c 69 6e 65 73 29 | 0a 20 20 20 20 20 20 66 |1 lines)|. f|
|00003630| 6f 72 77 61 72 64 2e 0a | 0a 0a 20 20 20 20 20 20 |orward..|.. |
|00003640| 20 46 6f 72 20 70 61 67 | 69 6e 67 20 62 61 63 6b | For pag|ing back|
|00003650| 77 61 72 64 2c 20 73 65 | 65 20 22 68 70 22 0a 20 |ward, se|e "hp". |
|00003660| 20 20 20 20 20 20 53 65 | 65 20 61 6c 73 6f 3a 20 | Se|e also: |
|00003670| 20 22 68 63 63 22 20 28 | 63 6f 6e 74 72 6f 6c 20 | "hcc" (|control |
|00003680| 63 68 61 72 61 63 74 65 | 72 73 29 20 61 6e 64 20 |characte|rs) and |
|00003690| 22 68 63 22 20 28 63 68 | 61 6e 67 65 29 2e 0a 20 |"hc" (ch|ange).. |
|000036a0| 20 20 20 20 20 20 54 6f | 20 72 65 74 75 72 6e 20 | To| return |
|000036b0| 74 6f 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 64 |to the c|ommand d|
|000036c0| 69 72 65 63 74 6f 72 79 | 2c 20 74 79 70 65 20 22 |irectory|, type "|
|000036d0| 68 63 6f 6d 64 69 72 2e | 22 0a 53 48 41 52 5f 45 |hcomdir.|".SHAR_E|
|000036e0| 4f 46 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |OF.fi # |end of o|
|000036f0| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|00003700| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 65 78 74 72 |.echo sh|ar: extr|
|00003710| 61 63 74 69 6e 67 20 22 | 27 63 6f 6d 27 22 20 27 |acting "|'com'" '|
|00003720| 28 35 38 39 20 63 68 61 | 72 61 63 74 65 72 73 29 |(589 cha|racters)|
|00003730| 27 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 63 6f |'.if tes|t -f 'co|
|00003740| 6d 27 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |m'.then.|.echo sh|
|00003750| 61 72 3a 20 77 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |ar: will| not ove|
|00003760| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00003770| 20 66 69 6c 65 20 22 27 | 63 6f 6d 27 22 0a 65 6c | file "'|com'".el|
|00003780| 73 65 0a 63 61 74 20 3c | 3c 20 5c 53 48 41 52 5f |se.cat <|< \SHAR_|
|00003790| 45 4f 46 20 3e 20 27 63 | 6f 6d 27 0a 20 20 20 20 |EOF > 'c|om'. |
|000037a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000037b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 43 | | C|
|000037c0| 6f 6d 6d 61 6e 64 73 0a | 20 20 20 20 20 20 20 20 |ommands.| |
|000037d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000037e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000037f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003810| 20 0a 20 20 20 20 20 20 | 20 20 57 68 65 6e 20 20 | . | When |
|00003820| 74 68 65 20 22 63 6d 64 | 3e 22 20 70 72 6f 6d 70 |the "cmd|>" promp|
|00003830| 74 20 61 70 70 65 61 72 | 73 20 6e 65 61 72 20 74 |t appear|s near t|
|00003840| 68 65 20 62 6f 74 74 6f | 6d 20 6f 66 20 74 68 65 |he botto|m of the|
|00003850| 20 73 63 72 65 65 6e 2c | 0a 20 20 20 20 20 20 20 | screen,|. |
|00003860| 20 61 20 63 6f 6d 6d 61 | 6e 64 20 6d 61 79 20 62 | a comma|nd may b|
|00003870| 65 20 74 79 70 65 64 2e | 20 20 43 6f 6d 6d 61 6e |e typed.| Comman|
|00003880| 64 73 20 77 6f 72 6b 20 | 66 6f 72 20 74 68 65 20 |ds work |for the |
|00003890| 6d 6f 73 74 20 20 70 61 | 72 74 20 20 74 68 65 0a |most pa|rt the.|
|000038a0| 20 20 20 20 20 20 20 20 | 73 61 6d 65 20 77 61 79 | |same way|
|000038b0| 20 61 73 20 63 6f 6d 6d | 61 6e 64 73 20 74 6f 20 | as comm|ands to |
|000038c0| 27 65 64 27 2c 20 74 68 | 65 20 55 6e 69 78 20 73 |'ed', th|e Unix s|
|000038d0| 79 73 74 65 6d 20 74 65 | 78 74 20 65 64 69 74 6f |ystem te|xt edito|
|000038e0| 72 20 77 69 74 68 0a 20 | 20 20 20 20 20 20 20 77 |r with. | w|
|000038f0| 68 69 63 68 20 79 6f 75 | 20 6d 61 79 20 62 65 20 |hich you| may be |
|00003900| 66 61 6d 69 6c 69 61 72 | 2e 0a 0a 20 20 20 20 20 |familiar|... |
|00003910| 20 20 20 20 20 54 6f 20 | 72 65 74 75 72 6e 20 74 | To |return t|
|00003920| 6f 20 74 68 65 20 67 65 | 6e 65 72 61 6c 20 68 65 |o the ge|neral he|
|00003930| 6c 70 20 64 69 72 65 63 | 74 6f 72 79 2c 20 74 79 |lp direc|tory, ty|
|00003940| 70 65 20 22 68 64 69 72 | 22 2e 20 20 20 20 20 20 |pe "hdir|". |
|00003950| 20 20 20 20 0a 20 20 20 | 20 20 20 20 20 20 20 46 | . | F|
|00003960| 6f 72 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 61 |or infor|mation a|
|00003970| 62 6f 75 74 20 73 70 65 | 63 69 66 69 63 20 63 6f |bout spe|cific co|
|00003980| 6d 6d 61 6e 64 73 2c 20 | 74 79 70 65 20 22 68 63 |mmands, |type "hc|
|00003990| 6f 6d 64 69 72 22 2e 20 | 20 20 20 20 20 20 0a 20 |omdir". | . |
|000039a0| 20 20 20 20 20 20 20 20 | 20 46 6f 72 20 64 65 74 | | For det|
|000039b0| 61 69 6c 73 20 6f 6e 20 | 63 6f 6d 6d 61 6e 64 20 |ails on |command |
|000039c0| 73 79 6e 74 61 78 2c 20 | 74 79 70 65 20 22 68 63 |syntax, |type "hc|
|000039d0| 6f 6d 73 79 6e 22 2e 20 | 20 20 20 20 20 20 20 20 |omsyn". | |
|000039e0| 20 20 20 20 20 20 20 20 | 0a 53 48 41 52 5f 45 4f | |.SHAR_EO|
|000039f0| 46 0a 66 69 20 23 20 65 | 6e 64 20 6f 66 20 6f 76 |F.fi # e|nd of ov|
|00003a00| 65 72 77 72 69 74 69 6e | 67 20 63 68 65 63 6b 0a |erwritin|g check.|
|00003a10| 65 63 68 6f 20 73 68 61 | 72 3a 20 65 78 74 72 61 |echo sha|r: extra|
|00003a20| 63 74 69 6e 67 20 22 27 | 63 6f 6d 64 69 72 27 22 |cting "'|comdir'"|
|00003a30| 20 27 28 38 31 39 20 63 | 68 61 72 61 63 74 65 72 | '(819 c|haracter|
|00003a40| 73 29 27 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |s)'.if t|est -f '|
|00003a50| 63 6f 6d 64 69 72 27 0a | 74 68 65 6e 0a 09 65 63 |comdir'.|then..ec|
|00003a60| 68 6f 20 73 68 61 72 3a | 20 77 69 6c 6c 20 6e 6f |ho shar:| will no|
|00003a70| 74 20 6f 76 65 72 2d 77 | 72 69 74 65 20 65 78 69 |t over-w|rite exi|
|00003a80| 73 74 69 6e 67 20 66 69 | 6c 65 20 22 27 63 6f 6d |sting fi|le "'com|
|00003a90| 64 69 72 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |dir'".el|se.cat <|
|00003aa0| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 63 |< \SHAR_|EOF > 'c|
|00003ab0| 6f 6d 64 69 72 27 0a 0a | 20 20 20 20 20 20 20 20 |omdir'..| |
|00003ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ad0| 20 20 20 20 20 20 43 6f | 6d 6d 61 6e 64 20 44 69 | Co|mmand Di|
|00003ae0| 72 65 63 74 6f 72 79 0a | 0a 20 20 20 20 20 20 20 |rectory.|. |
|00003af0| 20 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 61 | The fol|lowing a|
|00003b00| 72 65 20 74 68 65 20 66 | 75 6c 6c 20 6e 61 6d 65 |re the f|ull name|
|00003b10| 73 20 6f 66 20 6f 6e 65 | 2d 6c 65 74 74 65 72 20 |s of one|-letter |
|00003b20| 63 6f 6d 6d 61 6e 64 73 | 0a 20 20 20 20 20 20 20 |commands|. |
|00003b30| 20 41 70 70 65 6e 64 20 | 20 20 20 20 20 20 20 20 | Append | |
|00003b40| 20 20 20 43 68 61 6e 67 | 65 20 20 20 44 65 6c 65 | Chang|e Dele|
|00003b50| 74 65 20 20 20 45 6e 74 | 65 72 20 20 20 20 46 69 |te Ent|er Fi|
|00003b60| 6c 65 20 20 20 20 20 47 | 6c 6f 62 61 6c 0a 20 20 |le G|lobal. |
|00003b70| 20 20 20 20 20 20 48 65 | 6c 70 20 20 20 20 20 49 | He|lp I|
|00003b80| 6e 73 65 72 74 20 20 20 | 4a 6f 69 6e 20 20 20 20 |nsert |Join |
|00003b90| 20 6d 61 72 4b 20 20 20 | 20 20 4c 6f 63 61 74 65 | marK | Locate|
|00003ba0| 20 20 20 4d 6f 76 65 20 | 20 20 20 20 4e 61 6d 65 | Move | Name|
|00003bb0| 0a 20 20 20 20 20 20 20 | 20 4f 70 74 69 6f 6e 20 |. | Option |
|00003bc0| 20 20 50 61 67 65 20 20 | 20 20 20 51 75 69 74 20 | Page | Quit |
|00003bd0| 20 20 20 20 52 65 61 64 | 20 20 20 20 20 53 75 62 | Read| Sub|
|00003be0| 73 74 69 74 75 74 65 20 | 20 20 20 20 20 20 20 54 |stitute | T|
|00003bf0| 6f 0a 20 20 20 20 20 20 | 20 20 55 6e 64 65 6c 65 |o. | Undele|
|00003c00| 74 65 20 6f 56 65 72 6c | 61 79 20 20 57 72 69 74 |te oVerl|ay Writ|
|00003c10| 65 20 20 20 20 65 58 63 | 6c 75 64 65 20 20 74 72 |e eXc|lude tr|
|00003c20| 61 6e 73 6c 59 74 65 72 | 61 74 65 0a 0a 20 20 20 |anslYter|ate.. |
|00003c30| 20 20 20 20 20 46 6f 72 | 20 69 6e 66 6f 20 61 62 | For| info ab|
|00003c40| 6f 75 74 20 6f 6e 65 20 | 6f 66 20 74 68 65 73 65 |out one |of these|
|00003c50| 20 63 6f 6d 6d 61 6e 64 | 73 2c 20 74 79 70 65 20 | command|s, type |
|00003c60| 22 68 22 20 66 6f 6c 6c | 6f 77 65 64 20 62 79 0a |"h" foll|owed by.|
|00003c70| 20 20 20 20 20 20 20 20 | 77 68 69 63 68 65 76 65 | |whicheve|
|00003c80| 72 20 6c 65 74 74 65 72 | 20 69 73 20 63 61 70 69 |r letter| is capi|
|00003c90| 74 61 6c 69 7a 65 64 20 | 69 6e 20 74 68 65 20 63 |talized |in the c|
|00003ca0| 6f 6d 6d 61 6e 64 20 6e | 61 6d 65 20 61 62 6f 76 |ommand n|ame abov|
|00003cb0| 65 2e 0a 0a 20 20 20 20 | 20 20 20 20 4f 74 68 65 |e... | Othe|
|00003cc0| 72 20 63 6f 6d 6d 61 6e | 64 73 20 61 6e 64 20 74 |r comman|ds and t|
|00003cd0| 68 65 69 72 20 68 65 6c | 70 20 63 6f 6d 6d 61 6e |heir hel|p comman|
|00003ce0| 64 73 20 61 72 65 3a 0a | 20 20 20 20 20 20 20 20 |ds are:.| |
|00003cf0| 20 20 20 20 70 72 69 6e | 74 20 76 61 6c 75 65 20 | prin|t value |
|00003d00| 20 20 68 65 71 75 61 6c | 20 20 20 20 20 20 20 20 | hequal| |
|00003d10| 67 6c 6f 62 61 6c 20 6f | 6e 20 6d 61 72 6b 20 20 |global o|n mark |
|00003d20| 20 68 71 75 6f 74 65 0a | 20 20 20 20 20 20 20 20 | hquote.| |
|00003d30| 20 20 20 20 6d 69 73 63 | 65 6c 6c 61 6e 79 20 20 | misc|ellany |
|00003d40| 20 20 68 7a 20 20 20 20 | 20 20 20 20 20 20 20 20 | hz | |
|00003d50| 65 78 63 6c 75 64 65 20 | 6f 6e 20 6d 61 72 6b 20 |exclude |on mark |
|00003d60| 20 68 74 69 6c 64 65 0a | 20 20 20 20 20 20 20 20 | htilde.| |
|00003d70| 20 20 20 20 73 68 65 6c | 6c 20 65 73 63 61 70 65 | shel|l escape|
|00003d80| 20 20 68 73 68 65 6c 6c | 20 20 20 20 20 20 20 20 | hshell| |
|00003d90| 2e 73 65 72 63 20 66 69 | 6c 65 20 20 20 20 20 20 |.serc fi|le |
|00003da0| 20 68 73 65 72 63 0a 0a | 20 20 20 20 20 20 20 20 | hserc..| |
|00003db0| 54 68 65 72 65 20 61 72 | 65 20 73 74 69 6c 6c 20 |There ar|e still |
|00003dc0| 6d 6f 72 65 20 63 6f 6d | 6d 61 6e 64 73 3b 20 74 |more com|mands; t|
|00003dd0| 6f 20 73 65 65 20 74 68 | 65 6d 20 74 79 70 65 20 |o see th|em type |
|00003de0| 22 68 73 70 65 63 6c 22 | 2e 0a 53 48 41 52 5f 45 |"hspecl"|..SHAR_E|
|00003df0| 4f 46 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |OF.fi # |end of o|
|00003e00| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|00003e10| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 65 78 74 72 |.echo sh|ar: extr|
|00003e20| 61 63 74 69 6e 67 20 22 | 27 63 6f 6d 73 79 6e 27 |acting "|'comsyn'|
|00003e30| 22 20 27 28 37 32 32 20 | 63 68 61 72 61 63 74 65 |" '(722 |characte|
|00003e40| 72 73 29 27 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |rs)'.if |test -f |
|00003e50| 27 63 6f 6d 73 79 6e 27 | 0a 74 68 65 6e 0a 09 65 |'comsyn'|.then..e|
|00003e60| 63 68 6f 20 73 68 61 72 | 3a 20 77 69 6c 6c 20 6e |cho shar|: will n|
|00003e70| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|00003e80| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 22 27 63 6f |isting f|ile "'co|
|00003e90| 6d 73 79 6e 27 22 0a 65 | 6c 73 65 0a 63 61 74 20 |msyn'".e|lse.cat |
|00003ea0| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00003eb0| 63 6f 6d 73 79 6e 27 0a | 20 20 20 20 20 20 20 20 |comsyn'.| |
|00003ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ed0| 20 20 20 20 20 20 20 20 | 43 6f 6d 6d 61 6e 64 20 | |Command |
|00003ee0| 53 79 6e 74 61 78 0a 0a | 20 20 20 20 20 20 20 20 |Syntax..| |
|00003ef0| 41 20 63 6f 6d 6d 61 6e | 64 20 63 6f 6e 73 69 73 |A comman|d consis|
|00003f00| 74 73 20 20 6f 66 20 20 | 61 6e 20 20 6f 70 74 69 |ts of |an opti|
|00003f10| 6f 6e 61 6c 20 20 6c 69 | 73 74 20 20 6f 66 20 20 |onal li|st of |
|00003f20| 4c 49 4e 45 20 20 4e 55 | 4d 42 45 52 53 2c 0a 20 |LINE NU|MBERS,. |
|00003f30| 20 20 20 20 20 20 20 66 | 6f 6c 6c 6f 77 65 64 20 | f|ollowed |
|00003f40| 20 62 79 20 61 20 43 4f | 4d 4d 41 4e 44 20 4c 45 | by a CO|MMAND LE|
|00003f50| 54 54 45 52 2c 20 70 6f | 73 73 69 62 6c 79 20 66 |TTER, po|ssibly f|
|00003f60| 6f 6c 6c 6f 77 65 64 20 | 62 79 20 70 61 72 61 6d |ollowed |by param|
|00003f70| 65 74 65 72 73 0a 20 20 | 20 20 20 20 20 20 61 6c |eters. | al|
|00003f80| 6c 6f 77 65 64 20 6f 72 | 20 72 65 71 75 69 72 65 |lowed or| require|
|00003f90| 64 20 66 6f 72 20 61 20 | 73 70 65 63 69 66 69 63 |d for a |specific|
|00003fa0| 20 20 63 6f 6d 6d 61 6e | 64 2e 20 20 20 50 72 65 | comman|d. Pre|
|00003fb0| 63 65 65 64 69 6e 67 20 | 20 61 6c 6c 0a 20 20 20 |ceeding | all. |
|00003fc0| 20 20 20 20 20 74 68 69 | 73 2c 20 20 74 68 65 72 | thi|s, ther|
|00003fd0| 65 20 20 63 61 6e 20 62 | 65 20 61 20 47 4c 4f 42 |e can b|e a GLOB|
|00003fe0| 41 4c 20 50 52 45 46 49 | 58 20 70 72 65 63 65 65 |AL PREFI|X precee|
|00003ff0| 64 65 64 20 6f 70 74 69 | 6f 6e 61 6c 6c 79 20 62 |ded opti|onally b|
|00004000| 79 20 61 0a 20 20 20 20 | 20 20 20 20 6c 69 73 74 |y a. | list|
|00004010| 20 20 6f 66 20 20 6c 69 | 6e 65 20 20 20 6e 75 6d | of li|ne num|
|00004020| 62 65 72 73 2e 20 20 20 | 48 65 6e 63 65 20 20 20 |bers. |Hence |
|00004030| 74 68 65 20 20 20 77 68 | 6f 6c 65 20 20 20 73 79 |the wh|ole sy|
|00004040| 6e 74 61 78 20 20 20 69 | 73 3a 0a 0a 20 20 20 20 |ntax i|s:.. |
|00004050| 20 20 20 20 5b 5b 3c 6c | 69 73 74 3e 5d 3c 67 6c | [[<l|ist>]<gl|
|00004060| 6f 62 61 6c 20 70 72 65 | 66 69 78 3e 5d 5b 3c 6c |obal pre|fix>][<l|
|00004070| 69 73 74 3e 5d 3c 63 6f | 6d 6d 61 6e 64 20 6c 65 |ist>]<co|mmand le|
|00004080| 74 74 65 72 3e 5b 3c 73 | 74 75 66 66 3e 5d 0a 0a |tter>[<s|tuff>]..|
|00004090| 20 20 20 20 20 20 20 20 | 46 6f 72 20 67 65 6e 65 | |For gene|
|000040a0| 72 61 6c 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ral info|rmation |
|000040b0| 61 62 6f 75 74 20 63 6f | 6d 6d 61 6e 64 73 2c 20 |about co|mmands, |
|000040c0| 74 79 70 65 20 22 68 63 | 6f 6d 22 2e 0a 20 20 20 |type "hc|om".. |
|000040d0| 20 20 20 20 20 46 6f 72 | 20 69 6e 66 6f 72 6d 61 | For| informa|
|000040e0| 74 69 6f 6e 20 61 62 6f | 75 74 20 73 70 65 63 69 |tion abo|ut speci|
|000040f0| 66 69 63 20 63 6f 6d 6d | 61 6e 64 73 2c 20 74 79 |fic comm|ands, ty|
|00004100| 70 65 20 22 68 63 6f 6d | 64 69 72 22 2e 0a 20 20 |pe "hcom|dir".. |
|00004110| 20 20 20 20 20 20 46 6f | 72 20 47 4c 4f 42 41 4c | Fo|r GLOBAL|
|00004120| 20 50 52 45 46 49 58 20 | 73 79 6e 74 61 78 20 61 | PREFIX |syntax a|
|00004130| 6e 64 20 73 65 6d 61 6e | 74 69 63 73 2c 20 74 79 |nd seman|tics, ty|
|00004140| 70 65 20 22 68 67 22 2e | 0a 20 20 20 20 20 20 20 |pe "hg".|. |
|00004150| 20 46 6f 72 20 4c 49 4e | 45 20 4e 55 4d 42 45 52 | For LIN|E NUMBER|
|00004160| 20 4c 49 53 54 20 73 79 | 6e 74 61 78 20 61 6e 64 | LIST sy|ntax and|
|00004170| 20 73 65 6d 61 6e 74 69 | 63 73 2c 20 74 79 70 65 | semanti|cs, type|
|00004180| 20 22 68 6c 69 73 74 22 | 2e 0a 53 48 41 52 5f 45 | "hlist"|..SHAR_E|
|00004190| 4f 46 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |OF.fi # |end of o|
|000041a0| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|000041b0| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 65 78 74 72 |.echo sh|ar: extr|
|000041c0| 61 63 74 69 6e 67 20 22 | 27 64 27 22 20 27 28 36 |acting "|'d'" '(6|
|000041d0| 31 34 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |14 chara|cters)'.|
|000041e0| 69 66 20 74 65 73 74 20 | 2d 66 20 27 64 27 0a 74 |if test |-f 'd'.t|
|000041f0| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|00004200| 77 69 6c 6c 20 6e 6f 74 | 20 6f 76 65 72 2d 77 72 |will not| over-wr|
|00004210| 69 74 65 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ite exis|ting fil|
|00004220| 65 20 22 27 64 27 22 0a | 65 6c 73 65 0a 63 61 74 |e "'d'".|else.cat|
|00004230| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|00004240| 27 64 27 0a 20 20 20 20 | 20 20 20 20 64 20 20 20 |'d'. | d |
|00004250| 20 2d 2d 20 44 65 6c 65 | 74 65 20 63 6f 6d 6d 61 | -- Dele|te comma|
|00004260| 6e 64 0a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |nd.. | |
|00004270| 20 20 20 64 65 66 61 75 | 6c 74 20 72 61 6e 67 65 | defau|lt range|
|00004280| 20 20 20 20 20 20 20 20 | 20 20 20 73 79 6e 74 61 | | synta|
|00004290| 78 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x. | |
|000042a0| 20 20 20 20 20 20 20 20 | 20 20 20 2e 2c 2e 20 20 | | .,. |
|000042b0| 20 20 20 20 20 20 20 20 | 20 64 0a 0a 20 20 20 20 | | d.. |
|000042c0| 20 20 20 20 22 64 22 20 | 20 69 73 20 20 75 73 65 | "d" | is use|
|000042d0| 64 20 20 74 6f 20 20 64 | 65 6c 65 74 65 20 20 6c |d to d|elete l|
|000042e0| 69 6e 65 73 20 6f 66 20 | 74 65 78 74 20 66 72 6f |ines of |text fro|
|000042f0| 6d 20 74 68 65 20 62 75 | 66 66 65 72 2e 20 20 54 |m the bu|ffer. T|
|00004300| 68 65 0a 20 20 20 20 20 | 20 20 20 6c 69 6e 65 73 |he. | lines|
|00004310| 20 69 6e 20 74 68 65 20 | 72 61 6e 67 65 20 73 70 | in the |range sp|
|00004320| 65 63 69 66 69 65 64 20 | 20 62 79 20 20 74 68 65 |ecified | by the|
|00004330| 20 20 6c 69 6e 65 20 20 | 6e 75 6d 62 65 72 20 20 | line |number |
|00004340| 6c 69 73 74 20 20 61 72 | 65 0a 20 20 20 20 20 20 |list ar|e. |
|00004350| 20 20 64 65 6c 65 74 65 | 64 2e 20 20 20 54 68 65 | delete|d. The|
|00004360| 20 20 70 6f 73 69 74 69 | 6f 6e 69 6e 67 20 20 6f | positi|oning o|
|00004370| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6c 69 |f the cu|rrent li|
|00004380| 6e 65 20 70 6f 69 6e 74 | 65 72 20 61 66 74 65 72 |ne point|er after|
|00004390| 0a 20 20 20 20 20 20 20 | 20 65 78 65 63 75 74 69 |. | executi|
|000043a0| 6f 6e 20 6f 66 20 74 68 | 65 20 22 64 22 20 63 6f |on of th|e "d" co|
|000043b0| 6d 6d 61 6e 64 20 69 73 | 20 63 6f 6e 74 72 6f 6c |mmand is| control|
|000043c0| 6c 65 64 20 62 79 20 74 | 68 65 20 22 64 22 20 20 |led by t|he "d" |
|000043d0| 6f 70 74 69 6f 6e 3b 0a | 20 20 20 20 20 20 20 20 |option;.| |
|000043e0| 73 65 65 20 20 22 68 6f | 64 22 2e 20 20 20 54 68 |see "ho|d". Th|
|000043f0| 65 20 20 6e 6f 72 6d 61 | 6c 20 20 62 65 68 61 76 |e norma|l behav|
|00004400| 69 6f 72 20 20 69 73 20 | 74 6f 20 6d 61 6b 65 20 |ior is |to make |
|00004410| 74 68 65 20 66 69 72 73 | 74 20 6c 69 6e 65 0a 20 |the firs|t line. |
|00004420| 20 20 20 20 20 20 20 41 | 46 54 45 52 20 74 68 65 | A|FTER the|
|00004430| 20 6c 69 6e 65 73 20 64 | 65 6c 65 74 65 64 20 74 | lines d|eleted t|
|00004440| 68 65 20 6e 65 77 20 63 | 75 72 72 65 6e 74 20 6c |he new c|urrent l|
|00004450| 69 6e 65 2e 0a 0a 20 20 | 20 20 20 20 20 20 54 6f |ine... | To|
|00004460| 20 72 65 74 75 72 6e 20 | 74 6f 20 74 68 65 20 63 | return |to the c|
|00004470| 6f 6d 6d 61 6e 64 20 64 | 69 72 65 63 74 6f 72 79 |ommand d|irectory|
|00004480| 2c 20 74 79 70 65 20 22 | 68 63 6f 6d 64 69 72 2e |, type "|hcomdir.|
|00004490| 22 0a 20 20 20 20 20 20 | 20 20 53 65 65 20 61 6c |". | See al|
|000044a0| 73 6f 20 22 68 6f 64 22 | 2e 0a 53 48 41 52 5f 45 |so "hod"|..SHAR_E|
|000044b0| 4f 46 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |OF.fi # |end of o|
|000044c0| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|000044d0| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 65 78 74 72 |.echo sh|ar: extr|
|000044e0| 61 63 74 69 6e 67 20 22 | 27 64 65 74 61 62 2e 63 |acting "|'detab.c|
|000044f0| 27 22 20 27 28 31 33 39 | 32 20 63 68 61 72 61 63 |'" '(139|2 charac|
|00004500| 74 65 72 73 29 27 0a 69 | 66 20 74 65 73 74 20 2d |ters)'.i|f test -|
|00004510| 66 20 27 64 65 74 61 62 | 2e 63 27 0a 74 68 65 6e |f 'detab|.c'.then|
|00004520| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 77 69 6c |..echo s|har: wil|
|00004530| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|00004540| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 22 | existin|g file "|
|00004550| 27 64 65 74 61 62 2e 63 | 27 22 0a 65 6c 73 65 0a |'detab.c|'".else.|
|00004560| 63 61 74 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |cat << \|SHAR_EOF|
|00004570| 20 3e 20 27 64 65 74 61 | 62 2e 63 27 0a 23 69 66 | > 'deta|b.c'.#if|
|00004580| 6e 64 65 66 20 6c 69 6e | 74 0a 73 74 61 74 69 63 |ndef lin|t.static|
|00004590| 20 63 68 61 72 20 52 43 | 53 69 64 5b 5d 20 3d 20 | char RC|Sid[] = |
|000045a0| 22 24 48 65 61 64 65 72 | 3a 20 64 65 74 61 62 2e |"$Header|: detab.|
|000045b0| 63 2c 76 20 31 2e 31 20 | 38 36 2f 30 35 2f 30 36 |c,v 1.1 |86/05/06|
|000045c0| 20 31 34 3a 30 34 3a 33 | 37 20 61 72 6e 6f 6c 64 | 14:04:3|7 arnold|
|000045d0| 20 4c 6f 63 6b 65 64 20 | 24 22 3b 0a 23 65 6e 64 | Locked |$";.#end|
|000045e0| 69 66 0a 0a 2f 2a 0a 20 | 2a 20 24 4c 6f 67 3a 09 |if../*. |* $Log:.|
|000045f0| 64 65 74 61 62 2e 63 2c | 76 20 24 0a 20 2a 20 52 |detab.c,|v $. * R|
|00004600| 65 76 69 73 69 6f 6e 20 | 31 2e 31 20 20 38 36 2f |evision |1.1 86/|
|00004610| 30 35 2f 30 36 20 20 31 | 34 3a 30 34 3a 33 37 20 |05/06 1|4:04:37 |
|00004620| 20 61 72 6e 6f 6c 64 0a | 20 2a 20 49 6e 69 74 69 | arnold.| * Initi|
|00004630| 61 6c 20 72 65 76 69 73 | 69 6f 6e 0a 20 2a 20 0a |al revis|ion. * .|
|00004640| 20 2a 20 0a 20 2a 2f 0a | 0a 2f 2a 20 44 65 74 61 | * . */.|./* Deta|
|00004650| 62 20 2d 20 63 6f 6e 76 | 65 72 74 20 74 61 62 73 |b - conv|ert tabs|
|00004660| 20 74 6f 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 | to appr|opriate |
|00004670| 6e 75 6d 62 65 72 20 6f | 66 20 73 70 61 63 65 73 |number o|f spaces|
|00004680| 20 2a 2f 0a 0a 2f 2a 20 | 74 72 61 6e 73 63 72 69 | */../* |transcri|
|00004690| 62 65 64 20 66 72 6f 6d | 20 4b 65 72 6e 69 67 68 |bed from| Kernigh|
|000046a0| 61 6e 20 61 6e 64 20 50 | 6c 61 67 75 65 72 20 28 |an and P|laguer (|
|000046b0| 53 6f 66 74 77 61 72 65 | 20 54 6f 6f 6c 73 29 20 |Software| Tools) |
|000046c0| 2a 2f 0a 2f 2a 20 66 69 | 78 65 64 20 75 70 20 62 |*/./* fi|xed up b|
|000046d0| 79 20 41 72 6e 6f 6c 64 | 20 52 6f 62 62 69 6e 73 |y Arnold| Robbins|
|000046e0| 20 2a 2f 0a 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 | */..#in|clude <s|
|000046f0| 74 64 69 6f 2e 68 3e 0a | 0a 23 64 65 66 69 6e 65 |tdio.h>.|.#define|
|00004700| 20 4d 41 58 4c 49 4e 45 | 20 20 20 20 20 20 20 20 | MAXLINE| |
|00004710| 20 31 33 32 0a 0a 23 64 | 65 66 69 6e 65 20 72 65 | 132..#d|efine re|
|00004720| 70 65 61 74 20 20 20 20 | 20 20 20 20 20 20 64 6f |peat | do|
|00004730| 0a 23 64 65 66 69 6e 65 | 20 75 6e 74 69 6c 28 78 |.#define| until(x|
|00004740| 29 20 20 20 20 20 20 20 | 20 77 68 69 6c 65 28 21 |) | while(!|
|00004750| 28 78 29 29 0a 0a 23 64 | 65 66 69 6e 65 20 74 61 |(x))..#d|efine ta|
|00004760| 62 70 6f 73 28 63 6f 6c | 2c 20 74 61 62 73 29 20 |bpos(col|, tabs) |
|00004770| 20 20 20 20 20 20 28 20 | 28 63 6f 6c 20 3e 20 4d | ( |(col > M|
|00004780| 41 58 4c 49 4e 45 29 20 | 3f 20 31 20 3a 20 74 61 |AXLINE) |? 1 : ta|
|00004790| 62 73 5b 63 6f 6c 20 2d | 20 31 5d 29 0a 0a 6d 61 |bs[col -| 1])..ma|
|000047a0| 69 6e 28 29 0a 7b 0a 20 | 20 20 20 20 20 20 20 69 |in().{. | i|
|000047b0| 6e 74 20 63 2c 20 69 2c | 20 74 61 62 73 5b 4d 41 |nt c, i,| tabs[MA|
|000047c0| 58 4c 49 4e 45 5d 2c 20 | 63 6f 6c 20 3d 20 31 3b |XLINE], |col = 1;|
|000047d0| 0a 0a 20 20 20 20 20 20 | 20 20 73 65 74 74 61 62 |.. | settab|
|000047e0| 73 28 74 61 62 73 29 3b | 0a 0a 20 20 20 20 20 20 |s(tabs);|.. |
|000047f0| 20 20 77 68 69 6c 65 20 | 28 28 63 20 3d 20 67 65 | while |((c = ge|
|00004800| 74 63 68 61 72 28 29 29 | 20 21 3d 20 45 4f 46 29 |tchar())| != EOF)|
|00004810| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004820| 20 73 77 69 74 63 68 28 | 63 29 20 7b 0a 20 20 20 | switch(|c) {. |
|00004830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 61 73 | | cas|
|00004840| 65 20 27 5c 74 27 3a 0a | 20 20 20 20 20 20 20 20 |e '\t':.| |
|00004850| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004860| 72 65 70 65 61 74 0a 20 | 20 20 20 20 20 20 20 20 |repeat. | |
|00004870| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00004880| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048a0| 20 70 75 74 63 68 61 72 | 28 27 20 27 29 3b 0a 20 | putchar|(' ');. |
|000048b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | | c|
|000048d0| 6f 6c 2b 2b 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |ol++;. | |
|000048e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 20 | | } |
|000048f0| 75 6e 74 69 6c 28 74 61 | 62 70 6f 73 28 63 6f 6c |until(ta|bpos(col|
|00004900| 2c 20 74 61 62 73 29 29 | 3b 0a 20 20 20 20 20 20 |, tabs))|;. |
|00004910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004920| 20 20 62 72 65 61 6b 3b | 0a 0a 20 20 20 20 20 20 | break;|.. |
|00004930| 20 20 20 20 20 20 20 20 | 20 20 63 61 73 65 20 27 | | case '|
|00004940| 5c 6e 27 3a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |\n':. | |
|00004950| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 70 75 74 | | put|
|00004960| 63 68 61 72 28 27 5c 6e | 27 29 3b 0a 20 20 20 20 |char('\n|');. |
|00004970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004980| 20 20 20 20 63 6f 6c 20 | 3d 20 31 3b 0a 20 20 20 | col |= 1;. |
|00004990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000049a0| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 0a 20 20 20 | bre|ak;.. |
|000049b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 64 65 66 | | def|
|000049c0| 61 75 6c 74 3a 0a 20 20 | 20 20 20 20 20 20 20 20 |ault:. | |
|000049d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 75 | | pu|
|000049e0| 74 63 68 61 72 28 63 29 | 3b 0a 20 20 20 20 20 20 |tchar(c)|;. |
|000049f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a00| 20 20 63 6f 6c 2b 2b 3b | 0a 20 20 20 20 20 20 20 | col++;|. |
|00004a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a20| 20 62 72 65 61 6b 3b 0a | 20 20 20 20 20 20 20 20 | break;.| |
|00004a30| 20 20 20 20 20 20 20 20 | 7d 0a 7d 0a 0a 73 65 74 | |}.}..set|
|00004a40| 74 61 62 73 28 74 61 62 | 73 29 0a 69 6e 74 20 74 |tabs(tab|s).int t|
|00004a50| 61 62 73 5b 5d 3b 0a 7b | 0a 20 20 20 20 20 20 20 |abs[];.{|. |
|00004a60| 20 69 6e 74 20 69 3b 0a | 0a 20 20 20 20 20 20 20 | int i;.|. |
|00004a70| 20 66 6f 72 28 69 20 3d | 20 31 3b 20 69 20 3c 3d | for(i =| 1; i <=|
|00004a80| 20 4d 41 58 4c 49 4e 45 | 3b 20 69 2b 2b 29 0a 20 | MAXLINE|; i++). |
|00004a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 | | t|
|00004aa0| 61 62 73 5b 69 20 2d 20 | 31 5d 20 3d 20 28 28 69 |abs[i - |1] = ((i|
|00004ab0| 20 25 20 38 29 20 3d 3d | 20 31 29 3b 0a 20 20 20 | % 8) ==| 1);. |
|00004ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 | | /* |
|00004ad0| 72 65 73 75 6c 74 20 69 | 73 20 65 69 74 68 65 72 |result i|s either|
|00004ae0| 20 31 20 6f 72 20 30 20 | 2a 2f 0a 7d 0a 53 48 41 | 1 or 0 |*/.}.SHA|
|00004af0| 52 5f 45 4f 46 0a 66 69 | 20 23 20 65 6e 64 20 6f |R_EOF.fi| # end o|
|00004b00| 66 20 6f 76 65 72 77 72 | 69 74 69 6e 67 20 63 68 |f overwr|iting ch|
|00004b10| 65 63 6b 0a 65 63 68 6f | 20 73 68 61 72 3a 20 65 |eck.echo| shar: e|
|00004b20| 78 74 72 61 63 74 69 6e | 67 20 22 27 64 69 72 27 |xtractin|g "'dir'|
|00004b30| 22 20 27 28 34 34 31 20 | 63 68 61 72 61 63 74 65 |" '(441 |characte|
|00004b40| 72 73 29 27 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |rs)'.if |test -f |
|00004b50| 27 64 69 72 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |'dir'.th|en..echo|
|00004b60| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|00004b70| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00004b80| 69 6e 67 20 66 69 6c 65 | 20 22 27 64 69 72 27 22 |ing file| "'dir'"|
|00004b90| 0a 65 6c 73 65 0a 63 61 | 74 20 3c 3c 20 5c 53 48 |.else.ca|t << \SH|
|00004ba0| 41 52 5f 45 4f 46 20 3e | 20 27 64 69 72 27 0a 20 |AR_EOF >| 'dir'. |
|00004bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 48 | | H|
|00004bd0| 45 4c 50 20 44 49 52 45 | 43 54 4f 52 59 0a 0a 0a |ELP DIRE|CTORY...|
|00004be0| 20 20 20 20 20 20 20 20 | 54 6f 20 67 6f 20 62 61 | |To go ba|
|00004bf0| 63 6b 20 74 6f 20 74 68 | 65 20 67 65 6e 65 72 61 |ck to th|e genera|
|00004c00| 6c 20 64 65 73 63 72 69 | 70 74 69 6f 6e 2c 20 74 |l descri|ption, t|
|00004c10| 79 70 65 20 20 20 20 20 | 20 20 20 22 68 22 0a 20 |ype | "h". |
|00004c20| 20 20 20 20 20 20 20 46 | 6f 72 20 69 6e 66 6f 20 | F|or info |
|00004c30| 6f 6e 20 74 68 65 20 27 | 73 65 27 20 69 6e 76 6f |on the '|se' invo|
|00004c40| 6b 69 6e 67 20 63 6f 6d | 6d 61 6e 64 2c 20 74 79 |king com|mand, ty|
|00004c50| 70 65 20 20 20 20 20 20 | 20 20 22 68 61 72 67 73 |pe | "hargs|
|00004c60| 22 0a 20 20 20 20 20 20 | 20 20 46 6f 72 20 61 20 |". | For a |
|00004c70| 64 69 73 63 75 73 73 69 | 6f 6e 20 6f 66 20 63 6f |discussi|on of co|
|00004c80| 6d 6d 61 6e 64 73 2c 20 | 20 20 20 20 20 20 20 20 |mmands, | |
|00004c90| 20 74 79 70 65 20 20 20 | 20 20 20 20 20 22 68 63 | type | "hc|
|00004ca0| 6f 6d 22 0a 20 20 20 20 | 20 20 20 20 46 6f 72 20 |om". | For |
|00004cb0| 61 20 64 65 73 63 72 69 | 70 74 69 6f 6e 20 6f 66 |a descri|ption of|
|00004cc0| 20 27 73 65 27 73 20 70 | 72 6f 62 6c 65 6d 73 2c | 'se's p|roblems,|
|00004cd0| 20 20 20 74 79 70 65 20 | 20 20 20 20 20 20 20 22 | type | "|
|00004ce0| 68 62 75 67 22 0a 20 20 | 20 20 20 20 20 20 54 6f |hbug". | To|
|00004cf0| 20 6c 65 61 72 6e 20 61 | 62 6f 75 74 20 63 6f 6e | learn a|bout con|
|00004d00| 74 72 6f 6c 20 63 68 61 | 72 61 63 74 65 72 73 2c |trol cha|racters,|
|00004d10| 20 20 20 20 20 74 79 70 | 65 20 20 20 20 20 20 20 | typ|e |
|00004d20| 20 22 68 63 63 22 0a 20 | 20 20 20 20 20 20 20 46 | "hcc". | F|
|00004d30| 6f 72 20 69 6e 66 6f 20 | 6f 6e 20 6f 70 74 69 6f |or info |on optio|
|00004d40| 6e 73 2c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ns, | |
|00004d50| 20 20 20 20 20 20 74 79 | 70 65 20 20 20 20 20 20 | ty|pe |
|00004d60| 20 20 22 68 6f 22 0a 0a | 53 48 41 52 5f 45 4f 46 | "ho"..|SHAR_EOF|
|00004d70| 0a 66 69 20 23 20 65 6e | 64 20 6f 66 20 6f 76 65 |.fi # en|d of ove|
|00004d80| 72 77 72 69 74 69 6e 67 | 20 63 68 65 63 6b 0a 65 |rwriting| check.e|
|00004d90| 63 68 6f 20 73 68 61 72 | 3a 20 65 78 74 72 61 63 |cho shar|: extrac|
|00004da0| 74 69 6e 67 20 22 27 65 | 27 22 20 27 28 37 39 33 |ting "'e|'" '(793|
|00004db0| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|00004dc0| 20 74 65 73 74 20 2d 66 | 20 27 65 27 0a 74 68 65 | test -f| 'e'.the|
|00004dd0| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 77 69 |n..echo |shar: wi|
|00004de0| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00004df0| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00004e00| 22 27 65 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |"'e'".el|se.cat <|
|00004e10| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 65 |< \SHAR_|EOF > 'e|
|00004e20| 27 0a 20 20 20 20 20 20 | 20 20 20 20 65 20 20 20 |'. | e |
|00004e30| 20 2d 2d 20 45 6e 74 65 | 72 20 63 6f 6d 6d 61 6e | -- Ente|r comman|
|00004e40| 64 0a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d.. | |
|00004e50| 20 20 64 65 66 61 75 6c | 74 20 72 61 6e 67 65 20 | defaul|t range |
|00004e60| 20 20 20 20 20 20 20 20 | 20 20 73 79 6e 74 61 78 | | syntax|
|00004e70| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004e80| 20 20 20 20 20 20 20 20 | 20 20 6e 2f 61 20 20 20 | | n/a |
|00004e90| 20 20 20 20 20 20 20 20 | 65 5b 21 20 7c 20 78 5d | |e[! | x]|
|00004ea0| 20 5b 66 69 6c 65 20 6e | 61 6d 65 5d 0a 0a 20 20 | [file n|ame].. |
|00004eb0| 20 20 20 20 20 20 22 65 | 22 20 70 72 65 76 65 6e | "e|" preven|
|00004ec0| 74 73 20 6f 6e 65 20 66 | 72 6f 6d 20 68 61 76 69 |ts one f|rom havi|
|00004ed0| 6e 67 20 74 6f 20 65 78 | 69 74 20 61 6e 64 20 72 |ng to ex|it and r|
|00004ee0| 65 65 6e 74 65 72 20 74 | 68 65 20 65 64 69 74 6f |eenter t|he edito|
|00004ef0| 72 20 74 6f 0a 20 20 20 | 20 20 20 20 20 65 64 69 |r to. | edi|
|00004f00| 74 20 20 61 20 20 64 69 | 66 66 65 72 65 6e 74 20 |t a di|fferent |
|00004f10| 66 69 6c 65 2e 20 20 22 | 65 22 20 65 6d 70 74 69 |file. "|e" empti|
|00004f20| 65 73 20 74 68 65 20 65 | 64 69 74 20 62 75 66 66 |es the e|dit buff|
|00004f30| 65 72 2c 20 72 65 61 64 | 73 20 61 0a 20 20 20 20 |er, read|s a. |
|00004f40| 20 20 20 20 66 69 6c 65 | 2c 20 61 6e 64 20 72 65 | file|, and re|
|00004f50| 73 65 74 73 20 74 68 65 | 20 72 65 6d 65 6d 62 65 |sets the| remembe|
|00004f60| 72 65 64 20 66 69 6c 65 | 20 6e 61 6d 65 2e 20 20 |red file| name. |
|00004f70| 49 66 20 5b 66 69 6c 65 | 20 6e 61 6d 65 5d 20 20 |If [file| name] |
|00004f80| 69 73 0a 20 20 20 20 20 | 20 20 20 6f 6d 69 74 74 |is. | omitt|
|00004f90| 65 64 2c 20 20 74 68 65 | 20 20 72 65 6d 65 6d 62 |ed, the| rememb|
|00004fa0| 65 72 65 64 20 20 66 69 | 6c 65 20 20 6e 61 6d 65 |ered fi|le name|
|00004fb0| 20 69 73 20 75 73 65 64 | 2e 20 20 5b 21 5d 20 69 | is used|. [!] i|
|00004fc0| 73 20 75 73 65 64 20 74 | 6f 0a 20 20 20 20 20 20 |s used t|o. |
|00004fd0| 20 20 6f 76 65 72 72 69 | 64 65 20 61 20 63 68 65 | overri|de a che|
|00004fe0| 63 6b 20 6d 61 64 65 20 | 74 6f 20 70 72 65 76 65 |ck made |to preve|
|00004ff0| 6e 74 20 79 6f 75 20 66 | 72 6f 6d 20 61 63 63 69 |nt you f|rom acci|
|00005000| 64 65 6e 74 6c 79 20 6c | 6f 73 69 6e 67 20 20 61 |dently l|osing a|
|00005010| 0a 20 20 20 20 20 20 20 | 20 62 75 66 66 65 72 20 |. | buffer |
|00005020| 74 68 61 74 20 68 61 73 | 20 6e 6f 74 20 62 65 65 |that has| not bee|
|00005030| 6e 20 73 61 76 65 64 20 | 28 73 61 6d 65 20 61 73 |n saved |(same as|
|00005040| 20 69 6e 20 22 71 22 29 | 2e 20 5b 78 5d 20 20 20 | in "q")|. [x] |
|00005050| 69 73 20 75 73 65 64 0a | 20 20 20 20 20 20 20 20 |is used.| |
|00005060| 74 6f 20 74 75 72 6e 20 | 74 61 62 20 65 78 70 61 |to turn |tab expa|
|00005070| 6e 73 69 6f 6e 20 20 20 | 6f 6e 20 77 68 65 6e 20 |nsion |on when |
|00005080| 72 65 61 64 69 6e 67 20 | 74 68 65 20 66 69 6c 65 |reading |the file|
|00005090| 20 69 6e 2e 20 20 53 65 | 20 20 77 69 6c 6c 0a 20 | in. Se| will. |
|000050a0| 20 20 20 20 20 20 20 65 | 78 70 61 6e 64 20 65 6e | e|xpand en|
|000050b0| 76 69 72 6f 6e 6d 65 6e | 74 20 76 61 72 69 61 62 |vironmen|t variab|
|000050c0| 6c 65 73 20 74 68 61 74 | 20 73 74 61 72 74 20 77 |les that| start w|
|000050d0| 69 74 68 20 20 24 20 69 | 6e 20 66 69 6c 65 20 6e |ith $ i|n file n|
|000050e0| 61 6d 65 73 2e 0a 0a 20 | 20 20 20 20 20 20 20 54 |ames... | T|
|000050f0| 6f 20 72 65 74 75 72 6e | 20 74 6f 20 74 68 65 20 |o return| to the |
|00005100| 63 6f 6d 6d 61 6e 64 20 | 64 69 72 65 63 74 6f 72 |command |director|
|00005110| 79 2c 20 74 79 70 65 20 | 22 68 63 6f 6d 64 69 72 |y, type |"hcomdir|
|00005120| 2e 22 0a 20 20 20 20 20 | 20 20 20 53 65 65 20 61 |.". | See a|
|00005130| 6c 73 6f 3a 20 20 22 68 | 71 22 0a 53 48 41 52 5f |lso: "h|q".SHAR_|
|00005140| 45 4f 46 0a 66 69 20 23 | 20 65 6e 64 20 6f 66 20 |EOF.fi #| end of |
|00005150| 6f 76 65 72 77 72 69 74 | 69 6e 67 20 63 68 65 63 |overwrit|ing chec|
|00005160| 6b 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 65 78 74 |k.echo s|har: ext|
|00005170| 72 61 63 74 69 6e 67 20 | 22 27 65 68 27 22 20 27 |racting |"'eh'" '|
|00005180| 28 33 31 38 20 63 68 61 | 72 61 63 74 65 72 73 29 |(318 cha|racters)|
|00005190| 27 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 65 68 |'.if tes|t -f 'eh|
|000051a0| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|000051b0| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|000051c0| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|000051d0| 66 69 6c 65 20 22 27 65 | 68 27 22 0a 65 6c 73 65 |file "'e|h'".else|
|000051e0| 0a 63 61 74 20 3c 3c 20 | 5c 53 48 41 52 5f 45 4f |.cat << |\SHAR_EO|
|000051f0| 46 20 3e 20 27 65 68 27 | 0a 20 20 20 20 59 6f 75 |F > 'eh'|. You|
|00005200| 20 61 72 65 20 73 74 61 | 6e 64 69 6e 67 20 61 74 | are sta|nding at|
|00005210| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 61 20 72 6f | the end| of a ro|
|00005220| 61 64 20 62 65 66 6f 72 | 65 20 61 20 73 6d 61 6c |ad befor|e a smal|
|00005230| 6c 20 62 72 69 63 6b 20 | 62 75 69 6c 64 69 6e 67 |l brick |building|
|00005240| 2e 0a 20 20 20 20 61 72 | 6f 75 6e 64 20 79 6f 75 |.. ar|ound you|
|00005250| 20 69 73 20 61 20 66 6f | 72 65 73 74 2e 20 20 41 | is a fo|rest. A|
|00005260| 20 73 6d 61 6c 6c 20 73 | 74 72 65 61 6d 20 66 6c | small s|tream fl|
|00005270| 6f 77 73 20 6f 75 74 20 | 6f 66 20 74 68 65 20 62 |ows out |of the b|
|00005280| 75 69 6c 64 69 6e 67 20 | 61 6e 64 0a 20 20 20 20 |uilding |and. |
|00005290| 64 6f 77 6e 20 61 20 67 | 75 6c 6c 79 2e 0a 0a 0a |down a g|ully....|
|000052a0| 20 20 20 20 59 6f 75 20 | 61 72 65 20 69 6e 73 69 | You |are insi|
|000052b0| 64 65 20 61 20 62 75 69 | 6c 64 69 6e 67 2c 20 61 |de a bui|lding, a|
|000052c0| 20 77 65 6c 6c 20 68 6f | 75 73 65 20 66 6f 72 20 | well ho|use for |
|000052d0| 61 20 6c 61 72 67 65 20 | 73 70 72 69 6e 67 2e 0a |a large |spring..|
|000052e0| 0a 20 20 20 20 54 68 65 | 72 65 20 61 72 65 20 73 |. The|re are s|
|000052f0| 6f 6d 65 20 6b 65 79 73 | 20 6f 6e 20 74 68 65 20 |ome keys| on the |
|00005300| 67 72 6f 75 6e 64 20 68 | 65 72 65 2e 0a 0a 20 20 |ground h|ere... |
|00005310| 20 20 54 68 65 72 65 20 | 69 73 20 61 20 73 68 69 | There |is a shi|
|00005320| 6e 79 20 62 72 61 73 73 | 20 6c 61 6d 70 20 6e 65 |ny brass| lamp ne|
|00005330| 61 72 62 79 2e 0a 0a 53 | 48 41 52 5f 45 4f 46 0a |arby...S|HAR_EOF.|
|00005340| 66 69 20 23 20 65 6e 64 | 20 6f 66 20 6f 76 65 72 |fi # end| of over|
|00005350| 77 72 69 74 69 6e 67 20 | 63 68 65 63 6b 0a 65 63 |writing |check.ec|
|00005360| 68 6f 20 73 68 61 72 3a | 20 65 78 74 72 61 63 74 |ho shar:| extract|
|00005370| 69 6e 67 20 22 27 65 6c | 70 27 22 20 27 28 38 38 |ing "'el|p'" '(88|
|00005380| 31 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 69 |1 charac|ters)'.i|
|00005390| 66 20 74 65 73 74 20 2d | 66 20 27 65 6c 70 27 0a |f test -|f 'elp'.|
|000053a0| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|000053b0| 20 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 | will no|t over-w|
|000053c0| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|000053d0| 6c 65 20 22 27 65 6c 70 | 27 22 0a 65 6c 73 65 0a |le "'elp|'".else.|
|000053e0| 63 61 74 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |cat << \|SHAR_EOF|
|000053f0| 20 3e 20 27 65 6c 70 27 | 0a 20 20 20 20 20 20 20 | > 'elp'|. |
|00005400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 48 65 | | He|
|00005420| 6c 70 0a 0a 20 20 20 20 | 20 20 20 20 59 6f 75 20 |lp.. | You |
|00005430| 61 72 65 20 75 73 69 6e | 67 20 27 73 65 27 2c 20 |are usin|g 'se', |
|00005440| 74 68 65 20 20 47 65 6f | 72 67 69 61 20 20 54 65 |the Geo|rgia Te|
|00005450| 63 68 20 73 63 72 65 65 | 6e 20 65 64 69 74 6f 72 |ch scree|n editor|
|00005460| 20 77 68 69 63 68 20 20 | 69 73 0a 20 20 20 20 20 | which |is. |
|00005470| 20 20 20 62 61 73 65 64 | 20 75 70 6f 6e 20 74 68 | based| upon th|
|00005480| 65 20 65 64 69 74 6f 72 | 20 64 65 73 63 72 69 62 |e editor| describ|
|00005490| 65 64 20 69 6e 20 74 68 | 65 20 62 6f 6f 6b 20 53 |ed in th|e book S|
|000054a0| 4f 46 54 57 41 52 45 20 | 54 4f 4f 4c 53 2c 20 62 |OFTWARE |TOOLS, b|
|000054b0| 79 0a 20 20 20 20 20 20 | 20 20 42 72 69 61 6e 20 |y. | Brian |
|000054c0| 57 2e 20 20 4b 65 72 6e | 69 67 68 61 6e 20 20 61 |W. Kern|ighan a|
|000054d0| 6e 64 20 20 50 2e 20 20 | 20 4a 2e 20 20 20 50 6c |nd P. | J. Pl|
|000054e0| 61 75 67 65 72 20 20 20 | 28 41 64 64 69 73 6f 6e |auger |(Addison|
|000054f0| 2d 57 65 73 6c 65 79 2c | 0a 20 20 20 20 20 20 20 |-Wesley,|. |
|00005500| 20 31 39 37 36 29 2e 20 | 20 20 54 68 65 20 20 73 | 1976). | The s|
|00005510| 63 72 65 65 6e 2d 6f 72 | 69 65 6e 74 65 64 20 20 |creen-or|iented |
|00005520| 6d 6f 64 69 66 69 63 61 | 74 69 6f 6e 73 20 28 61 |modifica|tions (a|
|00005530| 6e 64 20 73 6f 6d 65 20 | 6f 74 68 65 72 73 29 0a |nd some |others).|
|00005540| 20 20 20 20 20 20 20 20 | 61 72 65 20 62 79 20 20 | |are by |
|00005550| 4a 61 63 6b 20 20 57 61 | 75 67 68 20 61 6e 64 20 |Jack Wa|ugh and |
|00005560| 20 50 65 72 72 79 20 20 | 46 6c 69 6e 6e 2e 20 20 | Perry |Flinn. |
|00005570| 44 61 6e 20 46 6f 72 73 | 79 74 68 20 74 72 61 6e |Dan Fors|yth tran|
|00005580| 73 6c 61 74 65 64 0a 20 | 20 20 20 20 20 20 20 74 |slated. | t|
|00005590| 68 65 20 52 61 74 66 6f | 72 20 69 6e 74 6f 20 43 |he Ratfo|r into C|
|000055a0| 2e 20 20 41 72 6e 6f 6c | 64 20 52 6f 62 62 69 6e |. Arnol|d Robbin|
|000055b0| 73 20 6d 6f 64 69 66 69 | 65 64 20 74 68 65 20 65 |s modifi|ed the e|
|000055c0| 64 69 74 6f 72 20 74 6f | 20 20 75 73 65 0a 20 20 |ditor to| use. |
|000055d0| 20 20 20 20 20 20 74 68 | 65 20 42 65 72 6b 65 6c | th|e Berkel|
|000055e0| 65 79 20 74 65 72 6d 6c | 69 62 20 6c 69 62 72 61 |ey terml|ib libra|
|000055f0| 72 79 2c 20 6d 61 6b 69 | 6e 67 20 74 68 65 20 65 |ry, maki|ng the e|
|00005600| 64 69 74 6f 72 20 74 65 | 72 6d 69 6e 61 6c 20 69 |ditor te|rminal i|
|00005610| 6e 64 65 2d 0a 20 20 20 | 20 20 20 20 20 70 65 6e |nde-. | pen|
|00005620| 64 61 6e 74 2e 20 20 4d | 6f 73 74 20 6f 66 20 74 |dant. M|ost of t|
|00005630| 68 69 73 20 20 27 68 65 | 6c 70 27 20 69 73 20 20 |his 'he|lp' is |
|00005640| 63 6f 75 72 74 65 73 79 | 20 20 6f 66 20 42 6f 62 |courtesy| of Bob|
|00005650| 20 20 47 6f 72 64 6f 6e | 20 6f 66 0a 20 20 20 20 | Gordon| of. |
|00005660| 20 20 20 20 50 72 69 6d | 65 20 20 52 65 73 65 61 | Prim|e Resea|
|00005670| 72 63 68 2c 20 61 73 20 | 20 61 6d 65 6e 64 65 64 |rch, as | amended|
|00005680| 20 62 79 20 20 41 72 6e | 6f 6c 64 20 52 6f 62 62 | by Arn|old Robb|
|00005690| 69 6e 73 2e 20 20 54 68 | 65 20 64 65 73 63 72 69 |ins. Th|e descri|
|000056a0| 70 2d 0a 20 20 20 20 20 | 20 20 20 74 69 6f 6e 20 |p-. | tion |
|000056b0| 62 65 66 6f 72 65 20 79 | 6f 75 20 6e 6f 77 20 20 |before y|ou now |
|000056c0| 69 73 20 20 69 6e 76 6f | 6b 65 64 20 62 79 20 74 |is invo|ked by t|
|000056d0| 68 65 20 20 22 68 22 20 | 28 68 65 6c 70 29 20 63 |he "h" |(help) c|
|000056e0| 6f 6d 6d 61 6e 64 2e 0a | 0a 20 20 20 20 20 20 20 |ommand..|. |
|000056f0| 20 46 6f 72 20 61 20 64 | 65 73 63 72 69 70 74 69 | For a d|escripti|
|00005700| 6f 6e 20 6f 66 20 74 68 | 65 20 27 68 65 6c 70 27 |on of th|e 'help'|
|00005710| 20 63 6f 6d 6d 61 6e 64 | 2c 20 74 79 70 65 20 22 | command|, type "|
|00005720| 68 68 22 2e 0a 20 20 20 | 20 20 20 20 20 46 69 6e |hh".. | Fin|
|00005730| 64 20 6f 75 74 20 77 68 | 61 74 20 74 68 65 20 68 |d out wh|at the h|
|00005740| 65 6c 70 20 63 6f 6d 6d | 61 6e 64 20 63 61 6e 20 |elp comm|and can |
|00005750| 74 65 6c 6c 20 79 6f 75 | 20 2d 20 74 79 70 65 20 |tell you| - type |
|00005760| 22 68 64 69 72 22 2e 0a | 0a 0a 53 48 41 52 5f 45 |"hdir"..|..SHAR_E|
|00005770| 4f 46 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |OF.fi # |end of o|
|00005780| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|00005790| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 65 78 74 72 |.echo sh|ar: extr|
|000057a0| 61 63 74 69 6e 67 20 22 | 27 65 71 75 61 6c 27 22 |acting "|'equal'"|
|000057b0| 20 27 28 33 30 36 20 63 | 68 61 72 61 63 74 65 72 | '(306 c|haracter|
|000057c0| 73 29 27 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |s)'.if t|est -f '|
|000057d0| 65 71 75 61 6c 27 0a 74 | 68 65 6e 0a 09 65 63 68 |equal'.t|hen..ech|
|000057e0| 6f 20 73 68 61 72 3a 20 | 77 69 6c 6c 20 6e 6f 74 |o shar: |will not|
|000057f0| 20 6f 76 65 72 2d 77 72 | 69 74 65 20 65 78 69 73 | over-wr|ite exis|
|00005800| 74 69 6e 67 20 66 69 6c | 65 20 22 27 65 71 75 61 |ting fil|e "'equa|
|00005810| 6c 27 22 0a 65 6c 73 65 | 0a 63 61 74 20 3c 3c 20 |l'".else|.cat << |
|00005820| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 65 71 75 |\SHAR_EO|F > 'equ|
|00005830| 61 6c 27 0a 20 20 20 20 | 20 20 20 20 20 3d 20 20 |al'. | = |
|00005840| 20 20 2d 2d 20 44 69 73 | 70 6c 61 79 20 4c 69 6e | -- Dis|play Lin|
|00005850| 65 20 4e 75 6d 62 65 72 | 20 63 6f 6d 6d 61 6e 64 |e Number| command|
|00005860| 0a 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00005870| 64 65 66 61 75 6c 74 20 | 72 61 6e 67 65 20 20 20 |default |range |
|00005880| 20 20 20 20 20 20 20 20 | 73 79 6e 74 61 78 0a 20 | |syntax. |
|00005890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058a0| 20 20 2e 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|000058b0| 20 20 20 20 20 3d 0a 0a | 20 20 20 20 20 20 22 3d | =..| "=|
|000058c0| 22 20 69 73 20 66 6f 72 | 20 64 65 74 65 72 6d 69 |" is for| determi|
|000058d0| 6e 69 6e 67 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |ning the| number |
|000058e0| 6f 66 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 6c |of the c|urrent l|
|000058f0| 69 6e 65 0a 20 20 20 20 | 20 20 74 68 61 74 20 79 |ine. | that y|
|00005900| 6f 75 20 61 72 65 20 65 | 64 69 74 69 6e 67 2e 0a |ou are e|diting..|
|00005910| 0a 0a 0a 20 20 20 20 20 | 20 20 54 6f 20 72 65 74 |... | To ret|
|00005920| 75 72 6e 20 74 6f 20 74 | 68 65 20 63 6f 6d 6d 61 |urn to t|he comma|
|00005930| 6e 64 20 64 69 72 65 63 | 74 6f 72 79 2c 20 74 79 |nd direc|tory, ty|
|00005940| 70 65 20 22 68 63 6f 6d | 64 69 72 2e 22 0a 20 20 |pe "hcom|dir.". |
|00005950| 20 20 20 20 20 53 65 65 | 20 61 6c 73 6f 3a 20 20 | See| also: |
|00005960| 22 68 6f 61 22 0a 53 48 | 41 52 5f 45 4f 46 0a 66 |"hoa".SH|AR_EOF.f|
|00005970| 69 20 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i # end |of overw|
|00005980| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 65 63 68 |riting c|heck.ech|
|00005990| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|000059a0| 6e 67 20 22 27 66 27 22 | 20 27 28 36 39 33 20 63 |ng "'f'"| '(693 c|
|000059b0| 68 61 72 61 63 74 65 72 | 73 29 27 0a 69 66 20 74 |haracter|s)'.if t|
|000059c0| 65 73 74 20 2d 66 20 27 | 66 27 0a 74 68 65 6e 0a |est -f '|f'.then.|
|000059d0| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 77 69 6c 6c |.echo sh|ar: will|
|000059e0| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|000059f0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 22 27 |existing| file "'|
|00005a00| 66 27 22 0a 65 6c 73 65 | 0a 63 61 74 20 3c 3c 20 |f'".else|.cat << |
|00005a10| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 66 27 0a |\SHAR_EO|F > 'f'.|
|00005a20| 20 20 20 20 20 20 20 20 | 66 20 2d 2d 20 46 69 6c | |f -- Fil|
|00005a30| 65 20 63 6f 6d 6d 61 6e | 64 0a 0a 20 20 20 20 20 |e comman|d.. |
|00005a40| 20 20 20 20 20 20 20 20 | 64 65 66 61 75 6c 74 20 | |default |
|00005a50| 72 61 6e 67 65 20 20 20 | 20 20 20 20 20 20 20 20 |range | |
|00005a60| 20 20 20 73 79 6e 74 61 | 78 0a 20 20 20 20 20 20 | synta|x. |
|00005a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 6e 2f 61 20 | | n/a |
|00005a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 66 20 | | f |
|00005a90| 5b 66 69 6c 65 20 6e 61 | 6d 65 5d 0a 0a 20 20 20 |[file na|me].. |
|00005aa0| 20 20 20 20 20 22 66 22 | 20 20 69 73 20 20 75 73 | "f"| is us|
|00005ab0| 65 64 20 74 6f 20 70 72 | 69 6e 74 20 6f 72 20 72 |ed to pr|int or r|
|00005ac0| 65 73 65 74 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |eset the| name of|
|00005ad0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 66 69 6c | the cur|rent fil|
|00005ae0| 65 0a 20 20 20 20 20 20 | 20 20 62 65 69 6e 67 20 |e. | being |
|00005af0| 65 64 69 74 65 64 2e 20 | 20 66 20 5b 66 69 6c 65 |edited. | f [file|
|00005b00| 20 6e 61 6d 65 5d 20 72 | 65 73 65 74 73 20 74 68 | name] r|esets th|
|00005b10| 65 20 6e 61 6d 65 20 66 | 6f 72 20 74 68 65 20 63 |e name f|or the c|
|00005b20| 75 72 72 65 6e 74 0a 20 | 20 20 20 20 20 20 20 66 |urrent. | f|
|00005b30| 69 6c 65 2e 20 20 54 68 | 69 73 20 66 69 6c 65 6e |ile. Th|is filen|
|00005b40| 61 6d 65 20 69 73 20 75 | 73 65 64 20 62 79 20 74 |ame is u|sed by t|
|00005b50| 68 65 20 22 77 22 2c 20 | 22 65 22 2c 20 61 6e 64 |he "w", |"e", and|
|00005b60| 20 20 22 72 22 20 20 63 | 6f 6d 2d 0a 20 20 20 20 | "r" c|om-. |
|00005b70| 20 20 20 20 6d 61 6e 64 | 73 20 20 77 68 65 6e 20 | mand|s when |
|00005b80| 20 6e 6f 20 20 70 61 72 | 61 6d 65 74 65 72 73 20 | no par|ameters |
|00005b90| 61 72 65 20 70 72 6f 76 | 69 64 65 64 2e 20 20 66 |are prov|ided. f|
|00005ba0| 20 64 6f 65 73 20 6e 6f | 74 20 63 68 61 6e 67 65 | does no|t change|
|00005bb0| 0a 20 20 20 20 20 20 20 | 20 74 68 65 20 22 6f 6b |. | the "ok|
|00005bc0| 22 20 74 6f 67 67 6c 65 | 2e 20 20 66 20 77 69 74 |" toggle|. f wit|
|00005bd0| 68 20 6e 6f 20 70 61 72 | 61 6d 65 74 65 72 73 20 |h no par|ameters |
|00005be0| 70 72 69 6e 74 73 20 6f | 75 74 20 74 68 65 20 72 |prints o|ut the r|
|00005bf0| 65 6d 65 6d 2d 0a 20 20 | 20 20 20 20 20 20 62 65 |emem-. | be|
|00005c00| 72 65 64 20 6e 61 6d 65 | 2e 20 20 49 6e 20 66 69 |red name|. In fi|
|00005c10| 6c 65 20 6e 61 6d 65 73 | 2c 20 53 65 20 77 69 6c |le names|, Se wil|
|00005c20| 6c 20 20 65 78 70 61 6e | 64 20 20 61 6e 79 20 20 |l expan|d any |
|00005c30| 65 6e 76 69 72 6f 6d 65 | 6e 74 0a 20 20 20 20 20 |envirome|nt. |
|00005c40| 20 20 20 76 61 72 69 61 | 62 6c 65 73 20 74 68 61 | varia|bles tha|
|00005c50| 74 20 73 74 61 72 74 20 | 77 69 74 68 20 61 20 24 |t start |with a $|
|00005c60| 2e 0a 0a 20 20 20 20 20 | 20 20 20 54 6f 20 20 72 |... | To r|
|00005c70| 65 74 75 72 6e 20 20 74 | 6f 20 20 74 68 65 20 20 |eturn t|o the |
|00005c80| 63 6f 6d 6d 61 6e 64 20 | 64 69 72 65 63 74 6f 72 |command |director|
|00005c90| 79 2c 20 74 79 70 65 20 | 22 68 63 6f 6d 64 69 72 |y, type |"hcomdir|
|00005ca0| 2e 22 20 20 53 65 65 0a | 20 20 20 20 20 20 20 20 |." See.| |
|00005cb0| 61 6c 73 6f 3a 20 20 22 | 68 65 22 2c 20 22 68 77 |also: "|he", "hw|
|00005cc0| 22 2c 20 22 68 72 22 2c | 20 61 6e 64 20 22 68 6f |", "hr",| and "ho|
|00005cd0| 6b 22 2e 0a 0a 53 48 41 | 52 5f 45 4f 46 0a 66 69 |k"...SHA|R_EOF.fi|
|00005ce0| 20 23 20 65 6e 64 20 6f | 66 20 6f 76 65 72 77 72 | # end o|f overwr|
|00005cf0| 69 74 69 6e 67 20 63 68 | 65 63 6b 0a 65 63 68 6f |iting ch|eck.echo|
|00005d00| 20 73 68 61 72 3a 20 65 | 78 74 72 61 63 74 69 6e | shar: e|xtractin|
|00005d10| 67 20 22 27 67 27 22 20 | 27 28 35 37 32 20 63 68 |g "'g'" |'(572 ch|
|00005d20| 61 72 61 63 74 65 72 73 | 29 27 0a 69 66 20 74 65 |aracters|)'.if te|
|00005d30| 73 74 20 2d 66 20 27 67 | 27 0a 74 68 65 6e 0a 09 |st -f 'g|'.then..|
|00005d40| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|00005d50| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00005d60| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 67 |xisting |file "'g|
|00005d70| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|00005d80| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 67 27 0a 20 |SHAR_EOF| > 'g'. |
|00005d90| 20 20 20 20 20 20 20 20 | 20 67 20 20 20 20 2d 2d | | g --|
|00005da0| 20 47 6c 6f 62 61 6c 20 | 63 6f 6d 6d 61 6e 64 0a | Global |command.|
|00005db0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005dc0| 64 65 66 61 75 6c 74 20 | 72 61 6e 67 65 20 20 20 |default |range |
|00005dd0| 20 20 20 20 20 20 20 20 | 73 79 6e 74 61 78 0a 20 | |syntax. |
|00005de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005df0| 20 20 20 20 20 20 20 20 | 31 2c 24 20 20 20 20 20 | |1,$ |
|00005e00| 20 20 20 20 20 20 67 2f | 70 61 74 74 65 72 6e 2f | g/|pattern/|
|00005e10| 63 6f 6d 6d 61 6e 64 0a | 0a 20 20 20 20 20 20 20 |command.|. |
|00005e20| 20 22 67 22 20 20 69 73 | 20 20 75 73 65 64 20 20 | "g" is| used |
|00005e30| 74 6f 20 70 65 72 66 6f | 72 6d 20 61 6e 20 65 64 |to perfo|rm an ed|
|00005e40| 69 74 69 6e 67 20 63 6f | 6d 6d 61 6e 64 20 6f 6e |iting co|mmand on|
|00005e50| 20 61 6c 6c 20 6c 69 6e | 65 73 20 74 68 61 74 0a | all lin|es that.|
|00005e60| 20 20 20 20 20 20 20 20 | 6d 61 74 63 68 20 74 68 | |match th|
|00005e70| 65 20 22 70 61 74 74 65 | 72 6e 22 2e 20 20 20 22 |e "patte|rn". "|
|00005e80| 70 61 74 74 65 72 6e 22 | 20 20 69 73 20 20 61 6e |pattern"| is an|
|00005e90| 79 20 20 6c 65 67 61 6c | 20 20 70 61 74 74 65 72 |y legal| patter|
|00005ea0| 6e 20 20 61 6e 64 0a 20 | 20 20 20 20 20 20 20 63 |n and. | c|
|00005eb0| 6f 6d 6d 61 6e 64 20 69 | 73 20 61 6e 20 65 64 69 |ommand i|s an edi|
|00005ec0| 74 6f 72 20 63 6f 6d 6d | 61 6e 64 2e 20 20 54 68 |tor comm|and. Th|
|00005ed0| 65 20 22 78 22 20 63 6f | 6d 6d 61 6e 64 20 69 73 |e "x" co|mmand is|
|00005ee0| 20 74 68 65 20 63 6f 6e | 76 65 72 73 65 0a 20 20 | the con|verse. |
|00005ef0| 20 20 20 20 20 20 6f 66 | 20 22 67 22 20 61 6e 64 | of| "g" and|
|00005f00| 20 70 65 72 66 6f 72 6d | 73 20 74 68 65 20 63 6f | perform|s the co|
|00005f10| 6d 6d 61 6e 64 20 6f 6e | 20 61 6c 6c 20 6c 69 6e |mmand on| all lin|
|00005f20| 65 73 20 74 68 61 74 20 | 64 6f 20 6e 6f 74 20 6d |es that |do not m|
|00005f30| 61 74 63 68 0a 20 20 20 | 20 20 20 20 20 74 68 65 |atch. | the|
|00005f40| 20 70 61 74 74 65 72 6e | 2e 20 20 54 68 65 20 22 | pattern|. The "|
|00005f50| 2f 22 20 6d 61 79 20 62 | 65 20 61 6e 79 20 63 68 |/" may b|e any ch|
|00005f60| 61 72 61 63 74 65 72 2e | 0a 0a 0a 20 20 20 20 20 |aracter.|... |
|00005f70| 20 20 20 54 6f 20 72 65 | 74 75 72 6e 20 74 6f 20 | To re|turn to |
|00005f80| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 64 69 72 65 |the comm|and dire|
|00005f90| 63 74 6f 72 79 2c 20 74 | 79 70 65 20 22 68 63 6f |ctory, t|ype "hco|
|00005fa0| 6d 64 69 72 2e 22 0a 20 | 20 20 20 20 20 20 20 53 |mdir.". | S|
|00005fb0| 65 65 20 61 6c 73 6f 3a | 20 20 22 68 78 22 20 61 |ee also:| "hx" a|
|00005fc0| 6e 64 20 22 68 70 61 74 | 22 2e 0a 53 48 41 52 5f |nd "hpat|"..SHAR_|
|00005fd0| 45 4f 46 0a 66 69 20 23 | 20 65 6e 64 20 6f 66 20 |EOF.fi #| end of |
|00005fe0| 6f 76 65 72 77 72 69 74 | 69 6e 67 20 63 68 65 63 |overwrit|ing chec|
|00005ff0| 6b 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 65 78 74 |k.echo s|har: ext|
|00006000| 72 61 63 74 69 6e 67 20 | 22 27 68 27 22 20 27 28 |racting |"'h'" '(|
|00006010| 35 33 31 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |531 char|acters)'|
|00006020| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 68 27 0a |.if test| -f 'h'.|
|00006030| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|00006040| 20 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 | will no|t over-w|
|00006050| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|00006060| 6c 65 20 22 27 68 27 22 | 0a 65 6c 73 65 0a 63 61 |le "'h'"|.else.ca|
|00006070| 74 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |t << \SH|AR_EOF >|
|00006080| 20 27 68 27 0a 20 20 20 | 20 20 20 20 20 20 20 68 | 'h'. | h|
|00006090| 20 20 20 20 2d 2d 20 48 | 65 6c 70 20 63 6f 6d 6d | -- H|elp comm|
|000060a0| 61 6e 64 0a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |and.. | |
|000060b0| 20 20 20 20 64 65 66 61 | 75 6c 74 20 72 61 6e 67 | defa|ult rang|
|000060c0| 65 20 20 20 20 20 20 20 | 20 20 20 20 73 79 6e 74 |e | synt|
|000060d0| 61 78 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ax. | |
|000060e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 6e 2f 61 20 | | n/a |
|000060f0| 20 20 20 20 20 20 20 20 | 20 20 68 5b 20 6e 75 6c | | h[ nul|
|00006100| 6c 20 7c 20 70 61 72 61 | 6d 65 74 65 72 5d 0a 0a |l | para|meter]..|
|00006110| 20 20 20 20 20 20 20 20 | 54 79 70 69 6e 67 20 20 | |Typing |
|00006120| 22 68 22 20 20 66 6f 6c | 6c 6f 77 65 64 20 20 62 |"h" fol|lowed b|
|00006130| 79 20 61 6e 79 20 63 68 | 61 72 61 63 74 65 72 20 |y any ch|aracter |
|00006140| 20 73 74 72 69 6e 67 20 | 73 69 6d 70 6c 79 20 64 | string |simply d|
|00006150| 69 73 70 6c 61 79 73 0a | 20 20 20 20 20 20 20 20 |isplays.| |
|00006160| 74 68 65 20 20 63 6f 6e | 74 65 6e 74 73 20 6f 66 |the con|tents of|
|00006170| 20 74 68 65 20 73 65 20 | 68 65 6c 70 20 73 63 72 | the se |help scr|
|00006180| 69 70 74 20 6f 66 20 74 | 68 61 74 20 6e 61 6d 65 |ipt of t|hat name|
|00006190| 20 61 74 20 74 68 65 20 | 74 6f 70 20 20 6f 66 0a | at the |top of.|
|000061a0| 20 20 20 20 20 20 20 20 | 74 68 65 20 20 73 63 72 | |the scr|
|000061b0| 65 65 6e 20 20 28 70 72 | 6f 76 69 64 65 64 20 20 |een (pr|ovided |
|000061c0| 74 68 65 20 20 73 63 72 | 69 70 74 20 20 65 78 69 |the scr|ipt exi|
|000061d0| 73 74 73 29 2e 20 20 54 | 68 65 20 20 73 63 72 69 |sts). T|he scri|
|000061e0| 70 74 73 20 61 72 65 0a | 20 20 20 20 20 20 20 20 |pts are.| |
|000061f0| 66 69 6c 65 73 20 69 6e | 20 74 68 65 20 64 69 72 |files in| the dir|
|00006200| 65 63 74 6f 72 79 20 27 | 2f 75 73 72 2f 6c 6f 63 |ectory '|/usr/loc|
|00006210| 61 6c 2f 6c 69 62 2f 73 | 65 5f 68 27 2e 20 49 66 |al/lib/s|e_h'. If|
|00006220| 20 74 68 65 20 73 63 72 | 69 70 74 6e 61 6d 65 0a | the scr|iptname.|
|00006230| 20 20 20 20 20 20 20 20 | 69 73 20 6f 6d 69 74 74 | |is omitt|
|00006240| 65 64 2c 20 22 65 6c 70 | 22 20 69 73 20 61 73 73 |ed, "elp|" is ass|
|00006250| 75 6d 65 64 2e 0a 0a 20 | 20 20 20 20 20 20 20 54 |umed... | T|
|00006260| 6f 20 73 65 65 20 61 20 | 67 65 6e 65 72 61 6c 20 |o see a |general |
|00006270| 64 69 72 65 63 74 6f 72 | 79 20 6f 66 20 68 65 6c |director|y of hel|
|00006280| 70 20 73 63 72 69 70 74 | 73 2c 20 74 79 70 65 20 |p script|s, type |
|00006290| 22 68 64 69 72 22 2e 0a | 53 48 41 52 5f 45 4f 46 |"hdir"..|SHAR_EOF|
|000062a0| 0a 66 69 20 23 20 65 6e | 64 20 6f 66 20 6f 76 65 |.fi # en|d of ove|
|000062b0| 72 77 72 69 74 69 6e 67 | 20 63 68 65 63 6b 0a 65 |rwriting| check.e|
|000062c0| 63 68 6f 20 73 68 61 72 | 3a 20 65 78 74 72 61 63 |cho shar|: extrac|
|000062d0| 74 69 6e 67 20 22 27 69 | 27 22 20 27 28 38 35 30 |ting "'i|'" '(850|
|000062e0| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|000062f0| 20 74 65 73 74 20 2d 66 | 20 27 69 27 0a 74 68 65 | test -f| 'i'.the|
|00006300| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 77 69 |n..echo |shar: wi|
|00006310| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00006320| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00006330| 22 27 69 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |"'i'".el|se.cat <|
|00006340| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 69 |< \SHAR_|EOF > 'i|
|00006350| 27 0a 20 20 20 20 20 20 | 20 20 20 69 20 20 20 20 |'. | i |
|00006360| 2d 2d 20 49 6e 73 65 72 | 74 20 63 6f 6d 6d 61 6e |-- Inser|t comman|
|00006370| 64 0a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d.. | |
|00006380| 20 64 65 66 61 75 6c 74 | 20 72 61 6e 67 65 20 20 | default| range |
|00006390| 20 20 20 20 20 20 20 20 | 20 73 79 6e 74 61 78 0a | | syntax.|
|000063a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063b0| 20 20 20 20 20 20 20 20 | 20 20 2e 20 20 20 20 20 | | . |
|000063c0| 20 20 20 20 20 20 69 0a | 0a 20 20 20 20 20 20 20 | i.|. |
|000063d0| 20 22 69 22 20 20 69 73 | 20 20 66 6f 72 20 20 69 | "i" is| for i|
|000063e0| 6e 73 65 72 74 69 6e 67 | 20 6e 65 77 20 6c 69 6e |nserting| new lin|
|000063f0| 65 73 20 6f 66 20 74 65 | 78 74 20 62 65 66 6f 72 |es of te|xt befor|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.