Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!sci34hub!eng3!felton From: felton@eng3.UUCP (Ed Felton) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Seeking "smarter" UUDECODE.C type utility Summary: Alternate solution provided! Keywords: AWK SCRIPT UUDECODE STRIP Message-ID: <727@eng3.UUCP> Date: 30 Jan 91 16:42:40 GMT References: <1991Jan22.020001.15847@ashtate> Reply-To: felton@eng3.sci.com (Ed Felton) Organization: SCI Technology, Inc., Huntsville, Al. Lines: 38 In article <1991Jan22.020001.15847@ashtate> tomr@ashtate (Tom Rombouts) writes: } }First of all, thanks to those on the net who have provided the }current UUDECODE.C. It works like a marvel, and I have used it }on some massive files to date with no problems. } }However, like all end users, I have a "wish list" item. Thus: } [ Wish List deleted for brevity... ] } }(Alternate solution: an AWK or CSH script that automatically }deletes non-uuencoded lines.) } }Tom Rombouts Torrance 'Tater tomr@ashtate.A-T.com V:(213)538-7108 Tom, ( and everyone else :) I don't have any answers for your wish list, but here is an alternate solution. Below is an AWK script I wrote specifically for the CBIP postings. I call it strip.awk It will pass through only the lines between "BEGIN--cut here--cut here" and "END--cut here--cut here" To use it, concatenate all the pieces together in the correct order, and do: awk strip < [infile] > [outfile] Good luck. -----------8<--------8<--------8<--------8<--------8<--------8<----------- BEGIN { FS = " "; do_it = 0 } $1 == "END--cut" && $2 == "here--cut" && $3 == "here" { do_it = 0 } do_it == 1 { print $0 } $1 == "BEGIN--cut" && $2 == "here--cut" && $3 == "here" { do_it = 1 } -----------8<--------8<--------8<--------8<--------8<--------8<-----------