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: perlshar
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, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 78 61 | 6e 74 68 21 6d 63 6e 63 |Path: xa|nth!mcnc|
|00000010| 21 6e 63 73 75 76 78 21 | 6c 6c 6c 2d 77 69 6e 6b |!ncsuvx!|lll-wink|
|00000020| 65 6e 21 6c 6c 6c 2d 74 | 69 73 21 61 6d 65 73 21 |en!lll-t|is!ames!|
|00000030| 6e 65 63 6e 74 63 21 6e | 63 6f 61 73 74 21 61 6c |necntc!n|coast!al|
|00000040| 6c 62 65 72 79 0a 46 72 | 6f 6d 3a 20 67 7a 40 73 |lbery.Fr|om: gz@s|
|00000050| 70 74 2e 65 6e 74 69 74 | 79 2e 63 6f 6d 20 28 47 |pt.entit|y.com (G|
|00000060| 61 69 6c 20 5a 61 63 68 | 61 72 69 61 73 29 0a 4e |ail Zach|arias).N|
|00000070| 65 77 73 67 72 6f 75 70 | 73 3a 20 63 6f 6d 70 2e |ewsgroup|s: comp.|
|00000080| 73 6f 75 72 63 65 73 2e | 6d 69 73 63 0a 53 75 62 |sources.|misc.Sub|
|00000090| 6a 65 63 74 3a 20 76 30 | 33 69 30 34 30 3a 20 61 |ject: v0|3i040: a|
|000000a0| 20 70 65 72 6c 20 73 68 | 61 72 20 66 69 6c 65 20 | perl sh|ar file |
|000000b0| 6d 61 6b 65 72 0a 4d 65 | 73 73 61 67 65 2d 49 44 |maker.Me|ssage-ID|
|000000c0| 3a 20 3c 33 31 30 40 73 | 70 74 2e 65 6e 74 69 74 |: <310@s|pt.entit|
|000000d0| 79 2e 63 6f 6d 3e 0a 44 | 61 74 65 3a 20 32 37 20 |y.com>.D|ate: 27 |
|000000e0| 4d 61 79 20 38 38 20 32 | 33 3a 31 34 3a 32 32 20 |May 88 2|3:14:22 |
|000000f0| 47 4d 54 0a 53 65 6e 64 | 65 72 3a 20 61 6c 6c 62 |GMT.Send|er: allb|
|00000100| 65 72 79 40 6e 63 6f 61 | 73 74 2e 55 55 43 50 0a |ery@ncoa|st.UUCP.|
|00000110| 52 65 70 6c 79 2d 54 6f | 3a 20 67 7a 40 73 70 74 |Reply-To|: gz@spt|
|00000120| 2e 65 6e 74 69 74 79 2e | 63 6f 6d 20 28 47 61 69 |.entity.|com (Gai|
|00000130| 6c 20 5a 61 63 68 61 72 | 69 61 73 29 0a 4f 72 67 |l Zachar|ias).Org|
|00000140| 61 6e 69 7a 61 74 69 6f | 6e 3a 20 54 68 65 20 45 |anizatio|n: The E|
|00000150| 6e 74 69 74 79 2c 20 43 | 61 6d 62 72 69 64 67 65 |ntity, C|ambridge|
|00000160| 2c 20 4d 41 0a 4c 69 6e | 65 73 3a 20 35 38 0a 41 |, MA.Lin|es: 58.A|
|00000170| 70 70 72 6f 76 65 64 3a | 20 61 6c 6c 62 65 72 79 |pproved:| allbery|
|00000180| 40 6e 63 6f 61 73 74 2e | 55 55 43 50 0a 0a 63 6f |@ncoast.|UUCP..co|
|00000190| 6d 70 2e 73 6f 75 72 63 | 65 73 2e 6d 69 73 63 3a |mp.sourc|es.misc:|
|000001a0| 20 56 6f 6c 75 6d 65 20 | 33 2c 20 49 73 73 75 65 | Volume |3, Issue|
|000001b0| 20 34 30 0a 53 75 62 6d | 69 74 74 65 64 2d 42 79 | 40.Subm|itted-By|
|000001c0| 3a 20 22 47 61 69 6c 20 | 5a 61 63 68 61 72 69 61 |: "Gail |Zacharia|
|000001d0| 73 22 20 3c 67 7a 40 73 | 70 74 2e 65 6e 74 69 74 |s" <gz@s|pt.entit|
|000001e0| 79 2e 63 6f 6d 3e 0a 41 | 72 63 68 69 76 65 2d 4e |y.com>.A|rchive-N|
|000001f0| 61 6d 65 3a 20 70 65 72 | 6c 73 68 61 72 0a 0a 54 |ame: per|lshar..T|
|00000200| 68 69 73 20 69 73 20 61 | 20 6c 69 74 74 6c 65 20 |his is a| little |
|00000210| 70 65 72 6c 20 73 63 72 | 69 70 74 20 74 6f 20 63 |perl scr|ipt to c|
|00000220| 72 65 61 74 65 20 73 68 | 61 72 20 66 69 6c 65 73 |reate sh|ar files|
|00000230| 2e 20 20 55 73 61 67 65 | 20 69 73 20 61 73 20 69 |. Usage| is as i|
|00000240| 6e 3a 0a 09 70 65 72 6c | 20 73 68 61 72 2e 70 20 |n:..perl| shar.p |
|00000250| 69 6e 70 75 74 20 66 69 | 6c 65 73 20 3e 20 73 68 |input fi|les > sh|
|00000260| 61 72 66 69 6c 65 0a 0a | 23 21 20 2f 62 69 6e 2f |arfile..|#! /bin/|
|00000270| 73 68 0a 23 20 54 68 69 | 73 20 69 73 20 61 20 73 |sh.# Thi|s is a s|
|00000280| 68 65 6c 6c 20 61 72 63 | 68 69 76 65 2c 20 6d 65 |hell arc|hive, me|
|00000290| 61 6e 69 6e 67 3a 0a 23 | 20 31 2e 20 52 65 6d 6f |aning:.#| 1. Remo|
|000002a0| 76 65 20 65 76 65 72 79 | 74 68 69 6e 67 20 61 62 |ve every|thing ab|
|000002b0| 6f 76 65 20 74 68 65 20 | 23 21 20 2f 62 69 6e 2f |ove the |#! /bin/|
|000002c0| 73 68 20 6c 69 6e 65 2e | 0a 23 20 32 2e 20 53 61 |sh line.|.# 2. Sa|
|000002d0| 76 65 20 74 68 65 20 72 | 65 73 75 6c 74 69 6e 67 |ve the r|esulting|
|000002e0| 20 74 65 78 74 20 69 6e | 20 61 20 66 69 6c 65 2e | text in| a file.|
|000002f0| 0a 23 20 33 2e 20 45 78 | 65 63 75 74 65 20 74 68 |.# 3. Ex|ecute th|
|00000300| 65 20 66 69 6c 65 20 77 | 69 74 68 20 2f 62 69 6e |e file w|ith /bin|
|00000310| 2f 73 68 20 28 6e 6f 74 | 20 63 73 68 29 20 74 6f |/sh (not| csh) to|
|00000320| 20 63 72 65 61 74 65 20 | 74 68 65 20 66 69 6c 65 | create |the file|
|00000330| 73 3a 0a 23 09 73 68 61 | 72 2e 70 0a 23 0a 69 66 |s:.#.sha|r.p.#.if|
|00000340| 20 74 65 73 74 20 2d 66 | 20 27 73 68 61 72 2e 70 | test -f| 'shar.p|
|00000350| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00000360| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00000370| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|00000380| 66 69 6c 65 20 22 27 73 | 68 61 72 2e 70 27 22 0a |file "'s|har.p'".|
|00000390| 65 6c 73 65 0a 09 65 63 | 68 6f 20 78 20 2d 20 27 |else..ec|ho x - '|
|000003a0| 73 68 61 72 2e 70 27 0a | 09 73 65 64 20 27 73 2f |shar.p'.|.sed 's/|
|000003b0| 5e 58 2f 2f 27 20 3e 27 | 73 68 61 72 2e 70 27 20 |^X//' >'|shar.p' |
|000003c0| 3c 3c 20 27 53 48 41 52 | 5f 45 4f 46 27 0a 58 70 |<< 'SHAR|_EOF'.Xp|
|000003d0| 72 69 6e 74 20 22 23 21 | 20 2f 62 69 6e 2f 73 68 |rint "#!| /bin/sh|
|000003e0| 0a 58 23 20 54 68 69 73 | 20 69 73 20 61 20 73 68 |.X# This| is a sh|
|000003f0| 65 6c 6c 20 61 72 63 68 | 69 76 65 2c 20 6d 65 61 |ell arch|ive, mea|
|00000400| 6e 69 6e 67 3a 0a 58 23 | 20 31 2e 20 52 65 6d 6f |ning:.X#| 1. Remo|
|00000410| 76 65 20 65 76 65 72 79 | 74 68 69 6e 67 20 61 62 |ve every|thing ab|
|00000420| 6f 76 65 20 74 68 65 20 | 23 21 20 2f 62 69 6e 2f |ove the |#! /bin/|
|00000430| 73 68 20 6c 69 6e 65 2e | 0a 58 23 20 32 2e 20 53 |sh line.|.X# 2. S|
|00000440| 61 76 65 20 74 68 65 20 | 72 65 73 75 6c 74 69 6e |ave the |resultin|
|00000450| 67 20 74 65 78 74 20 69 | 6e 20 61 20 66 69 6c 65 |g text i|n a file|
|00000460| 2e 0a 58 23 20 33 2e 20 | 45 78 65 63 75 74 65 20 |..X# 3. |Execute |
|00000470| 74 68 65 20 66 69 6c 65 | 20 77 69 74 68 20 2f 62 |the file| with /b|
|00000480| 69 6e 2f 73 68 20 28 6e | 6f 74 20 63 73 68 29 20 |in/sh (n|ot csh) |
|00000490| 74 6f 20 63 72 65 61 74 | 65 20 74 68 65 20 66 69 |to creat|e the fi|
|000004a0| 6c 65 73 3a 0a 58 23 09 | 22 2c 6a 6f 69 6e 28 22 |les:.X#.|",join("|
|000004b0| 5c 6e 23 5c 74 22 2c 40 | 41 52 47 56 29 2c 22 5c |\n#\t",@|ARGV),"\|
|000004c0| 6e 23 5c 6e 22 3b 0a 58 | 0a 58 77 68 69 6c 65 20 |n#\n";.X|.Xwhile |
|000004d0| 28 24 61 72 67 20 3d 20 | 73 68 69 66 74 29 20 7b |($arg = |shift) {|
|000004e0| 0a 58 20 20 40 64 69 72 | 73 20 3d 20 73 70 6c 69 |.X @dir|s = spli|
|000004f0| 74 28 2f 5c 2f 2f 2c 24 | 61 72 67 29 3b 0a 58 20 |t(/\//,$|arg);.X |
|00000500| 20 66 6f 72 20 28 24 69 | 3d 30 3b 20 24 69 20 3c | for ($i|=0; $i <|
|00000510| 20 24 23 64 69 72 73 3b | 20 24 69 2b 2b 29 20 7b | $#dirs;| $i++) {|
|00000520| 0a 58 20 20 20 20 24 64 | 69 72 20 2e 3d 20 24 64 |.X $d|ir .= $d|
|00000530| 69 72 73 5b 24 69 5d 3b | 0a 58 20 20 20 20 69 66 |irs[$i];|.X if|
|00000540| 20 28 24 64 69 72 20 26 | 26 20 21 24 64 6f 6e 65 | ($dir &|& !$done|
|00000550| 7b 24 64 69 72 7d 29 20 | 7b 0a 58 20 20 20 20 20 |{$dir}) |{.X |
|00000560| 20 70 72 69 6e 74 20 22 | 69 66 20 74 65 73 74 20 | print "|if test |
|00000570| 21 20 2d 64 20 27 24 64 | 69 72 27 5c 6e 74 68 65 |! -d '$d|ir'\nthe|
|00000580| 6e 5c 6e 5c 74 6d 6b 64 | 69 72 20 27 24 64 69 72 |n\n\tmkd|ir '$dir|
|00000590| 27 5c 6e 66 69 5c 6e 22 | 3b 0a 58 20 20 20 20 20 |'\nfi\n"|;.X |
|000005a0| 20 24 64 6f 6e 65 7b 24 | 64 69 72 7d 20 3d 20 31 | $done{$|dir} = 1|
|000005b0| 3b 0a 58 20 20 20 20 7d | 0a 58 20 20 20 20 24 64 |;.X }|.X $d|
|000005c0| 69 72 20 2e 3d 20 22 2f | 22 3b 0a 58 20 20 7d 0a |ir .= "/|";.X }.|
|000005d0| 58 20 20 40 73 74 61 74 | 20 3d 20 73 74 61 74 28 |X @stat| = stat(|
|000005e0| 24 61 72 67 29 3b 0a 58 | 20 20 24 73 69 7a 65 20 |$arg);.X| $size |
|000005f0| 3d 20 24 73 74 61 74 5b | 37 5d 3b 0a 58 20 20 6f |= $stat[|7];.X o|
|00000600| 70 65 6e 28 66 69 6c 65 | 2c 20 24 61 72 67 29 3b |pen(file|, $arg);|
|00000610| 0a 58 20 20 70 72 69 6e | 74 20 22 69 66 20 74 65 |.X prin|t "if te|
|00000620| 73 74 20 2d 66 20 27 24 | 61 72 67 27 5c 6e 74 68 |st -f '$|arg'\nth|
|00000630| 65 6e 5c 6e 22 3b 0a 58 | 20 20 70 72 69 6e 74 20 |en\n";.X| print |
|00000640| 22 5c 74 65 63 68 6f 20 | 73 68 61 72 3a 20 77 69 |"\techo |shar: wi|
|00000650| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00000660| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00000670| 5c 22 27 24 61 72 67 27 | 5c 22 5c 6e 22 3b 0a 58 |\"'$arg'|\"\n";.X|
|00000680| 20 20 70 72 69 6e 74 20 | 22 65 6c 73 65 5c 6e 22 | print |"else\n"|
|00000690| 3b 0a 58 20 20 70 72 69 | 6e 74 20 22 5c 74 65 63 |;.X pri|nt "\tec|
|000006a0| 68 6f 20 78 20 2d 20 27 | 24 61 72 67 27 5c 6e 22 |ho x - '|$arg'\n"|
|000006b0| 3b 0a 58 20 20 70 72 69 | 6e 74 20 22 5c 74 73 65 |;.X pri|nt "\tse|
|000006c0| 64 20 27 73 2f 5e 58 2f | 2f 27 20 3e 27 24 61 72 |d 's/^X/|/' >'$ar|
|000006d0| 67 27 20 3c 3c 20 27 53 | 48 41 52 5f 45 4f 46 27 |g' << 'S|HAR_EOF'|
|000006e0| 5c 6e 22 3b 0a 58 20 20 | 77 68 69 6c 65 20 28 3c |\n";.X |while (<|
|000006f0| 66 69 6c 65 3e 29 20 7b | 20 70 72 69 6e 74 20 22 |file>) {| print "|
|00000700| 58 22 2c 24 5f 3b 20 7d | 0a 58 20 20 70 72 69 6e |X",$_; }|.X prin|
|00000710| 74 20 22 53 48 41 52 5f | 45 4f 46 5c 6e 22 3b 0a |t "SHAR_|EOF\n";.|
|00000720| 58 20 20 70 72 69 6e 74 | 20 22 69 66 20 74 65 73 |X print| "if tes|
|00000730| 74 20 24 73 69 7a 65 20 | 2d 6e 65 20 5c 22 60 77 |t $size |-ne \"`w|
|00000740| 63 20 2d 63 20 3c 20 27 | 24 61 72 67 27 60 5c 22 |c -c < '|$arg'`\"|
|00000750| 5c 6e 74 68 65 6e 5c 6e | 22 3b 0a 58 20 20 70 72 |\nthen\n|";.X pr|
|00000760| 69 6e 74 20 22 5c 74 65 | 63 68 6f 20 73 68 61 72 |int "\te|cho shar|
|00000770| 3a 20 65 72 72 6f 72 20 | 74 72 61 6e 73 6d 69 74 |: error |transmit|
|00000780| 74 69 6e 67 20 5c 22 27 | 24 61 72 67 27 5c 22 20 |ting \"'|$arg'\" |
|00000790| 27 28 73 68 6f 75 6c 64 | 20 68 61 76 65 20 62 65 |'(should| have be|
|000007a0| 65 6e 20 24 73 69 7a 65 | 20 63 68 61 72 61 63 74 |en $size| charact|
|000007b0| 65 72 73 29 27 5c 6e 66 | 69 5c 6e 66 69 5c 6e 22 |ers)'\nf|i\nfi\n"|
|000007c0| 3b 0a 58 7d 0a 58 70 72 | 69 6e 74 20 22 65 63 68 |;.X}.Xpr|int "ech|
|000007d0| 6f 20 44 6f 6e 65 5c 6e | 65 78 69 74 20 30 5c 6e |o Done\n|exit 0\n|
|000007e0| 22 3b 0a 53 48 41 52 5f | 45 4f 46 0a 69 66 20 74 |";.SHAR_|EOF.if t|
|000007f0| 65 73 74 20 31 30 31 34 | 20 2d 6e 65 20 22 60 77 |est 1014| -ne "`w|
|00000800| 63 20 2d 63 20 3c 20 27 | 73 68 61 72 2e 70 27 60 |c -c < '|shar.p'`|
|00000810| 22 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |".then..|echo sha|
|00000820| 72 3a 20 65 72 72 6f 72 | 20 74 72 61 6e 73 6d 69 |r: error| transmi|
|00000830| 74 74 69 6e 67 20 22 27 | 73 68 61 72 2e 70 27 22 |tting "'|shar.p'"|
|00000840| 20 27 28 73 68 6f 75 6c | 64 20 68 61 76 65 20 62 | '(shoul|d have b|
|00000850| 65 65 6e 20 31 30 31 34 | 20 63 68 61 72 61 63 74 |een 1014| charact|
|00000860| 65 72 73 29 27 0a 66 69 | 0a 66 69 0a 65 63 68 6f |ers)'.fi|.fi.echo|
|00000870| 20 44 6f 6e 65 0a 65 78 | 69 74 20 30 0a | Done.ex|it 0. |
+--------+-------------------------+-------------------------+--------+--------+