🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #2353

Re: Printing From trn?

#2353
From: Will Estes
Date: Sat, 10 Oct 1992 01:04
61 lines
2764 bytes
davison@borland.com (Wayne Davison) writes:

>westes@netcom.com (Will Estes) wrote:
>> how do I configure trn so that it uses csh instead of sh as the
>> environment in which to execute the piped command?

>Excerpts from the trn manpage:

>#     | command
>#             Shorthand for "s | command".

>#     s destination
>#             Save to a filename or pipe using sh.  If  the  first
>                                         ^^^^^^^^
>#     S destination
>#             Save to a filename or pipe using a preferred  shell,
>#             such  as  csh.  Which shell is used depends first on
>#             what you have the environment variable SHELL set to,

>So by extrapolation, you'd do a:

>        S | progname

>to use the current setting of your SHELL variable.  Alternately, you could
>macro | to "S|" by putting the following line into your .rnmac file:

>|       %(%m=a?S|:|)

>though you might just want to macro some other character to the entire
>print command:

>~       %(%m=a?S|lpr^M:~)

>(both of these are untested, but they should work).  Also, check out the
>PIPESAVER environment variable:

>#     PIPESAVER (%)
>#             The shell command to execute in order to  accomplish
>#             a  save  to a pipe ("s | command" or "w | command").
>#             The command typed by the user is substituted  in  as
>#             %b.
>#
>#             Default: %(%B=^0$?<%A:tail +%Bc %A |) %b
>#
>#             Explanation: if %B is 0, the command  is  "<%A  %b",

>which could be modified to execute csh from the spawned sh.  Perhaps:

>%(%B=^0$?/bin/csh <%A:tail +%Bc %A | /bin/csh) %b

>would work.

And as you'll find out if you try any of the above: the aliases for the
replacement shell won't be effective (in csh's case, .cshrc doesn't
run).  So it looks like I'm stuck writing a script.

Hmm, does anyone vote for just adding an option to trn to print the
current article using some command that you can specify in a settings
file?

Will
Technical Details
Message-ID: <1992Oct10.010423.19422@netcom.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-netcom.general.mbox.zip!sparky!uunet!know!hri.com!spool.mu.edu!news.cs.indiana.edu!umn.edu!csus.edu!netcom.com!westes
References: <1992Oct4.213425.3041@netcom.com> <_4x1Hg08&9@atlantis.psu.edu> <1992Oct5.234128.17631@netcom.com> <Bvrqpq.6oJ@borland.com>

Show Full Headers
Complete Article Headers
Message-ID: <1992Oct10.010423.19422@netcom.com>
Subject: Re: Printing From trn?
Date: Sat, 10 Oct 1992 01:04:23 +0000
From: westes@netcom.com (Will Estes)
References: <1992Oct4.213425.3041@netcom.com> <_4x1Hg08&9@atlantis.psu.edu> <1992Oct5.234128.17631@netcom.com> <Bvrqpq.6oJ@borland.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-netcom.general.mbox.zip!sparky!uunet!know!hri.com!spool.mu.edu!news.cs.indiana.edu!umn.edu!csus.edu!netcom.com!westes
Newsgroups: news.software.readers,netcom.general,netcom.software
Organization: Mail Group
Lines: 61