Xref: utzoo comp.lang.perl:4189 alt.sources:3279 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl,alt.sources Subject: Re: An AWK script to check "junk" for newsgroups Message-ID: <11548@jpl-devvax.JPL.NASA.GOV> Date: 22 Feb 91 00:31:04 GMT References: <112753@mamnix.hamm.sub.org> <~Y+&#J#@ads.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 57 In article Sepp@ppcger.ppc.sub.org (Josef Wolf) writes: : dglo@ADS.COM (Dave Glowacki) writes: : : ] Since, as a rule, EVERY C or shell program posted must be followed up : ] by a PERL script, here's my version of NEWJUNK. : : Well. Fine fine. But what about using standard-tools? Which *IX is : _delivered_ with Perl? Convex's OS. BSD 4.4 will have it. It's included with GNU. Eventually everyone will include it, I suspect. : Now here is my version of NEWJUNK. It could have been better, but older : versions of gawk have these ugly memory-leak, so you have to sort out : the 'Newsgroups:' lines and pipe it into gawk :-( Well. Fine fine. But what about using standard-tools? Which *IX is _delivered_ with gawk? :-) : The awk-version will most likely be slower than the C-version and the : Perl-Version, but it schould run on most *IX with little modifications. Right. On my Vax: $ awk -f newjunk.awk awk -f newjunk awk: syntax error near line 6 awk: illegal statement near line 6 awk: syntax error near line 11 awk: illegal statement near line 11 awk: syntax error near line 12 awk: illegal statement near line 12 awk: syntax error near line 15 awk: illegal statement near line 15 awk: syntax error near line 16 awk: illegal statement near line 16 awk: syntax error near line 19 awk: illegal statement near line 19 awk: syntax error near line 20 awk: illegal statement near line 20 awk: syntax error near line 27 awk: bailing out near line 27 On my Sun: $ nawk -f newjunk.awk nawk: empty regular expression source line number 51 context is >>> // <<< { Your "standard" tools ain't so standard. :-( Larry Brought to you by Super Global Mega Corp .com