Article View: news.software.nntp
Article #7719Re: Backslashes in control.ctl
From: Dougal Campbell
Date: Sat, 18 May 1996 00:00
Date: Sat, 18 May 1996 00:00
49 lines
2714 bytes
2714 bytes
Erland Sommarskog (sommar@algonet.se) proclaimed:
> This is probably a stupid question, because I am overlooking something
> obvious, but here it goes.
> In the README for the PGP pacth to INN, Dave Lawrence suggests the following
> control.ctl excerpt:
> newgroup:tale@uunet.uu.net:\
> comp.*|humanities.*|misc.*|news.*|rec.*|sci.*|soc.*|talk.*:\
> verify-news.announce.newgroups
> rmgroup:tale@uunet.uu.net:\
> comp.*|humanities.*|misc.*|news.*|rec.*|sci.*|soc.*|talk.*:\
> verify-news.announce.newgroups
> But as I understand the place where you read control.ctl is in parsecontrol,
> on the following line:
> ${EGREP} "^(${PROG}|all):" <${CTLFILE} >${TEMP}
> But not even GNU egrep 2.0 - which is what ${EGREP} translates to at
> this place, takes the backslash in regard so all that gets into the
> temp file is the first line, and thus not the group pattern.
> But I would not expect Dave Lawrence to put something in his README
> without testing it, and if it was such an obvious mistake several
> people would have pointed it out to him by now and he would have
> corrected it. As I know his mailbox is under constant overload, I
> rather ask here, without bothering by something as trivial as this.
> Because I am overlooking something, am I not?
The trick is that the shell interprets th backslashes before your
${EGREP} ever gets a chance to see them. When the shell sees a
backslash at the end of a line, it interprets it as a sort of
line-continuation token, and combines the current line with the next
one.
So, in the example above, ${EGRP} would only read two lines: one
starting with "newgroup" and another starting with "rmgroup". Using
backslashes as continuation markers is just a tool for enhancing the
human-readability of the files.
--
Dougal Campbell | "Quick to judge, quick to anger. | Rush
System Administrator | Slow to understand. | "Witch Hunt"
interQuest / Hsv, AL | Ignorance and predjudice | Moving Pictures
dougal@iquest.com | And fear go hand in hand." | 1981
Technical Details
Message-ID:
<4nllr8$khl@polo.iquest.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<4nl0iu$5cg@epimetheus.algonet.se>Show Full Headers
Complete Article Headers
Message-ID: <4nllr8$khl@polo.iquest.com> Subject: Re: Backslashes in control.ctl Date: Sat, 18 May 1996 00:00:00 +0000 From: dougal@vespucci.iquest.com (Dougal Campbell) References: <4nl0iu$5cg@epimetheus.algonet.se> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 155517710 Distribution: world Organization: interQuest Online Services -- Huntsville, AL Newsgroups: news.software.nntp