Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!linus!philabs!ttidca!svirsky From: svirsky@ttidca.TTI.COM (Bill Svirsky) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Could I be doing this wrong Message-ID: <26891@ttidca.TTI.COM> Date: 14 Jun 91 16:21:47 GMT References: <1991Jun13.162222.26396@hollie.rdg.dec.com> Organization: Citicorp/TTI, Santa Monica Lines: 57 To: carty@dteng1.enet.dec.com (Hugh Carty) Subject: Re: Could I be doing this wrong Newsgroups: comp.binaries.ibm.pc.d In article <1991Jun13.162222.26396@hollie.rdg.dec.com> you write: > Got some .ZIP files from SIMTEL via mail server. > Came in parts1 and 2. > From mail I did s 1 part01 > s 2 part02 > did a quit from mail. No need to do any of the following: > I edited the part01 and left it as follows > begin 600 SPARKL28.ZIP > M4$L#!`H`!@`&`&V*N!8H:+>T"U0``)()`0`+````4U!!4DM,12Y$3T-A"GL'..... > ........ > and part02 as follows > (&AH:&AH:&AHZ > ` > end > I did cat part02 >> part01 The following simple script will concatenate all of the parts, stripping out the mail header and trailer garbage, and pump the result into uudecode. This script ONLY works for mail from the simtel list servers. #! /bin/sh sed s/^------* End of part/,/^------* Part/d' $* | uudecode If you name the script combinsimtel, although I don't know any self-respecting Unix programmer that would use a name that long (: (I use uudsim myself), you would only need to say combinsimtel part*. One thing to keep in mind here is how Unix orders files when you use wildcards. Make sure that you use the same number of digits in the sequential portion of the filenames; part9 DOES NOT come before part10, part09 comes before part10. uudecode uses the information in the "begin" line to create it's output file. In your case, you would end up with a file named SPARKL28.ZIP. This, not part01, is the zip file. Unfortunately, now another problem crops up. The version of unzip I have for Unix looks for a file ending in .zip, not .ZIP. Unix, unlike MSDOS, is case sensitive. So you have to rename the file to end with .zip, such as sparkl28.zip. If you use the following slightly more complex script instead of the one above, it will automatically lowercase the entire filename - in your case, to sparkl28.zip. #! /bin/sh sed '/^begin/y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ s/^begin 0600/begin 0644/ /^------* End of part/,/^------* Part/d' $* | uudecode Now you should be able to say unzip -v sparkl28 -- Bill Svirsky, Citicorp+TTI, 3100 Ocean Park Blvd., Santa Monica, CA 90405 Work phone: 213-450-9111 x2597 svirsky@ttidca.tti.com | ...!{csun,psivax,rdlvax,retix}!ttidca!svirsky