🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #201624

Re: Correct syntax slrn NNTPSERVER?

#201624
From: Chris F.A. Johnson
Date: Mon, 09 Jul 2007 14:41
51 lines
2550 bytes
On 2007-07-09, Adam Funk wrote:
> On 2007-07-09, andrew wrote:
>
>>  I ignored some excellent advice on this group a month ago that
>> concerned setting the NNTPSERVER variable for slrn. I have come back
>> with my tail between my legs and a question:
>>
>>  I added the following to my ~/.bashrc file:
>
> [1]
>> NNTPSERVER='my news server' && export NNTPSERVER
>>
>>  and slrn was perfectly happy with this. But I have substituted the
>> following line which also works with no problem, as reccommended by
>> this NG:
>
> [2]
>> export NNTPSERVER=my news server
>>
>>  Which is the most correct syntax? The first example is in the
>> documentation for slrn but both work. I am a little puzzled :-)
>
> In bash, they both work and have the same result.

   No. 2 will not work; it should be:

export NNTPSERVER="my news server"

> I suspect that in some other sh-like shells, [1] works but [2]
> doesn't.
>
> Perhaps someone in comp.unix.shell can confirm or correct this?

   The POSIX shell syntax is:

export NNTPSERVER="my news server"

   The traditional method (also works in POSIX shells):

NNTPSERVER=my news server
export NNTPSERVER

   The syntax in No. 1 will work unless an error is generated in the
   assignment.

-- 
   Chris F.A. Johnson, author       <http://cfaj.freeshell.org/shell/>
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
   ===== My code in this post, if any, assumes the POSIX locale
   ===== and is released under the GNU General Public Licence
Technical Details
Message-ID: <g2u9m4-tsp.ln1@206-248-139-163.dsl.teksavvy.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.shell.mbox.zip!g2news1.google.com!news3.google.com!out04a.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!TEKSAVVY.COM-a2kHrUvQQWlmc!not-for-mail
References: <slrnf93n56.fn3.nospam@ilium.invalid> <rcf9m4-g54.ln1@news.ducksburg.com>

Show Full Headers
Complete Article Headers
Message-ID: <g2u9m4-tsp.ln1@206-248-139-163.dsl.teksavvy.com>
Subject: Re: Correct syntax slrn NNTPSERVER?
Date: Mon, 9 Jul 2007 10:41:52 -0400
From: "Chris F.A. Johnson" <cfajohnson@gmail.com>
References: <slrnf93n56.fn3.nospam@ilium.invalid> <rcf9m4-g54.ln1@news.ducksburg.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.shell.mbox.zip!g2news1.google.com!news3.google.com!out04a.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!TEKSAVVY.COM-a2kHrUvQQWlmc!not-for-mail
Newsgroups: news.software.readers,comp.unix.shell
Reply-To: cfajohnson@gmail.com
User-Agent: slrn/0.9.8.1 (Linux)
X-Complaints-To: abuse@usenetserver.com
Organization: UseNetServer.com
Lines: 50
X-Trace: 1dc72469249776b5d2e0612994