Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Combine script (was Re: More silence in comp.binaries.ibm.pc) Message-ID: <24211@iuvax.cs.indiana.edu> Date: 3 Aug 89 14:56:03 GMT References: <8472@bsu-cs.bsu.edu> <2487@astroatc.UUCP> <26918@srcsip.UUCP> <5154@umd5.umd.edu> Reply-To: bobmon@iuvax.cs.indiana.edu (RAMontante) Organization: malkaryotic Lines: 23 dschuetz@umd5.umd.edu (David Schuetz) <5154@umd5.umd.edu> : - -As long as we're talking about combine, could somebody please tell me what -the "sed '/^END/,/^BEGIN/d'" (or whatever) does? I figured that it -deleted everything not within the BEGIN/END block of the file, but in Almost. Precisely, it finds sets of lines starting with a line that begins with `END' ("^" means "beginning of line"), and ending with a line that begins with `BEGIN', and deletes those sets of lines. When a set of c.b.i.p. postings are concatenated, each one ends with an END line, then there's some junk including headers in the next file, then the next file's body starts with a BEGIN line. This "internal" junk is deleted. However, it won't touch the stuff before the first BEGIN line (in the first file), because there is no initial END line --- but uudecode ignores header lines up to its own `begin 666 filename' line anyway. Similarly, it won't scrape off garbage following the (last) END line, but uudecode ignores trailing garbage after its own `end' line as well. So the `sed ...' command only has an effect when multiple files are concatenated together.