Article View: news.admin.technical
Article #62Re: Scanning out the "For your newsgroups file:" line
From: Mark Brader
Date: Mon, 25 Jan 1993 17:45
Date: Mon, 25 Jan 1993 17:45
22 lines
1351 bytes
1351 bytes
[Side note: the article to which this is a followup had "Followup-To:
news.admin.misc", even though the topic is technical, and there was
no explanation of this in the text. I hope this was simply an error
by the original poster, which the moderator didn't notice.]
> 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.071027.16697@sq.sq.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!not-for-mailReferences:
<1jvjvpINN8mb@ftp.UU.NET>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!not-for-mail From: msb@sq.com (Mark Brader) Newsgroups: news.admin.technical Subject: Re: Scanning out the "For your newsgroups file:" line Date: 25 Jan 1993 12:45:00 -0500 Organization: SoftQuad Inc., Toronto, Canada Lines: 23 Sender: zorch@ftp.UU.NET Approved: zorch@uunet.UU.NET Distribution: world Message-ID: <1993Jan25.071027.16697@sq.sq.com> References: <1jvjvpINN8mb@ftp.UU.NET> NNTP-Posting-Host: ftp.uu.net