Article View: news.admin.misc
Article #251Re: Scanning out the "For your newsgroups file:" line
From: Mark Brader
Date: Mon, 25 Jan 1993 07:01
Date: Mon, 25 Jan 1993 07:01
17 lines
980 bytes
980 bytes
> Last week I posted an inquiry for a piece of sed or other code that
> would give me the line FOLLOWING the "For your newsgroups file:" line...
> I figured that it would be a simple one liner or so ...
And so it is, if you use awk rather than sed. In new awk:
awk '/^For your newsgroups file:/ {getline; print; exit}'
In old awk, I believe it takes two lines:
awk '/^For your newsgroups file:/ {hit = NR+1}
NR == hit {print; exit}'
--
Mark Brader, Toronto sed -e "s;??\\([-=(/)'<!>]\\);?\\\\?\\1;g"
utzoo!sq!msb, msb@sq.com will fix them... -- Karl Heuer
This article is in the public domain.
Technical Details
Message-ID:
<1993Jan25.070159.16581@sq.sq.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!wildcan!sq!msbReferences:
<1jvjvpINN8mb@ftp.UU.NET>Show Full Headers
Complete Article Headers
Newsgroups: news.admin.misc Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!wildcan!sq!msb From: msb@sq.sq.com (Mark Brader) Subject: Re: Scanning out the "For your newsgroups file:" line Message-ID: <1993Jan25.070159.16581@sq.sq.com> Organization: SoftQuad Inc., Toronto, Canada References: <1jvjvpINN8mb@ftp.UU.NET> Date: Mon, 25 Jan 93 07:01:59 GMT Lines: 17