🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

6 total messages Started by Will Estes Sun, 04 Oct 1992 21:34
Printing From trn?
#45
Author: Will Estes
Date: Sun, 04 Oct 1992 21:34
5 lines
490 bytes
How does one print an article from trn?  Where do you set the print
string?

Thanks,
Will Estes		Internet: westes@netcom.com
Re: Printing From trn?
#46
Author: David Barr
Date: Sun, 04 Oct 1992 22:13
9 lines
688 bytes
In article <1992Oct4.213425.3041@netcom.com> westes@netcom.com (Will Estes) writes:
>How does one print an article from trn?  Where do you set the print
>string?

| lpr

--Dave
-- 
System Administrator, Population Research Institute    barr@pop.psu.edu
Re: Printing From trn?
#47
Author: Robert Hood
Date: Mon, 05 Oct 1992 01:41
41 lines
1624 bytes
In article <_4x1Hg08&9@atlantis.psu.edu> barr@pop.psu.edu (David Barr) writes:
>In article <1992Oct4.213425.3041@netcom.com> westes@netcom.com (Will Estes) writes:
>>How does one print an article from trn?  Where do you set the print
>>string?
>
>| lpr

This won't work on Netcom, since our users dial in from home/work, and
don't have access to our printers.

Attached is a little C program I use to print to my local printer.
Basically, it isues a VT100 printer-on escape sequence, sends the data, then
isues a VT100 printer-off escape squence.  Make sure your terminal
emulator supports this.

I call it "lprint", so from trn, I can type "| lprint", and the article will
be printed to my printer.

#include <stdio.h>

main ()
	{
	int in;

/* turn on printer */
	putchar (27);
	putchar ('[');
	putchar ('5');
	putchar ('i');
	while ((in = getc (stdin)) >= 0)
		{
		putchar (in);
		}
	putchar (27);
	putchar ('[');
	putchar ('4');
	putchar ('i');
	}
-- 
    Robert Hood             hoodr@netcom.com             (408) 554-UNIX
  System/Network Administrator for Netcom On-line Communications Services
Re: Printing From trn?
#48
Author: Will Estes
Date: Mon, 05 Oct 1992 23:41
13 lines
911 bytes
barr@pop.psu.edu (David Barr) writes:

>In article <1992Oct4.213425.3041@netcom.com> westes@netcom.com (Will Estes) writes:
>>How does one print an article from trn?  Where do you set the print
>>string?

>| lpr

So far so good.  But your solution leads me to my next question: how do I configure
trn so that it uses csh instead of sh as the environment in which to
execute the piped command?

Thanks!
Re: Printing From trn?
#49
Author: David Barr
Date: Tue, 06 Oct 1992 15:30
26 lines
1391 bytes
In article <1992Oct5.234128.17631@netcom.com> westes@netcom.com (Will Estes) writes:
>barr@pop.psu.edu (David Barr) writes:
>
>>In article <1992Oct4.213425.3041@netcom.com> westes@netcom.com (Will Estes) writes:
>>>How does one print an article from trn?  Where do you set the print
>>>string?
>
>>| lpr
>
>So far so good.  But your solution leads me to my next question: how do I configure
>trn so that it uses csh instead of sh as the environment in which to
>execute the piped command?

did you try:

setenv SHELL /bin/csh

?  (This is all rather clearly documented in the man page)

Why do you need csh in this case, anyway?

--Dave
-- 
System Administrator, Population Research Institute    barr@pop.psu.edu
  Contains: Carbonated water, high fructose corn syrup and/or sugar, caramel 
  color, phosphoric acid, caffeine, citric acid and natural flavorings.
Re: Printing From trn?
#51
Author: Will Estes
Date: Tue, 06 Oct 1992 18:54
34 lines
1526 bytes
barr@pop.psu.edu (David Barr) writes:

>In article <1992Oct5.234128.17631@netcom.com> westes@netcom.com (Will Estes) writes:
>>barr@pop.psu.edu (David Barr) writes:
>>
>>>In article <1992Oct4.213425.3041@netcom.com> westes@netcom.com (Will Estes) writes:
>>>>How does one print an article from trn?  Where do you set the print
>>>>string?
>>
>>>| lpr
>>
>>So far so good.  But your solution leads me to my next question: how do I configure
>>trn so that it uses csh instead of sh as the environment in which to
>>execute the piped command?

>did you try:

>setenv SHELL /bin/csh

>?  (This is all rather clearly documented in the man page)

Yes, I execute setenv SHELL /bin/csh from my .cshrc, but it doesn't take
hold. trn is still using /bin/sh.


>Why do you need csh in this case, anyway?

Because I have an alias that prints to a postscript printer like this:
	(cat .ps-prefix; cat ) | print -h -PNEC

For misc. reasons, I would rather have that as an alias than a script.

Thanks,
Will
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads