🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: netcom.general
Article #50

Re: Printing From trn?

#50
From: Sridhar Venkataraman
Date: Tue, 06 Oct 1992 18:20
62 lines
2633 bytes
barr@pop.psu.edu (David Barr)
writes on news.software.readers:

)westes@netcom.com (Will Estes) writes:
)
)>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 sent the same reply by mail and I tried the same thing myself.
Sigh. It didn't work!

I read through the whole manpage. Nope. No clues why. The some "echo
$PATH" and "echo $path" inside .cshrc explained what was happening.
Here is what my .cshrc looks like: (Pardon any lousy scripting  and
also please no csh flames. I know, I know csh is lousy. :)

Then I realised that *rn takes only env. variables and passes the same
to any process it spawns. So passing of csh or tcsh variables doesn't
happen.  Hence you need to manipulate PATH using env. vars *only*.

This one is after I made corrections. Previously it had oldpath as a
shell variable and was tacked on to $path.

if ( $?OLDPATH ) then
#For debugging
	echo "Path already set"
else
	setenv OLDPATH `echo $PATH | sed -e 's/\.//g'`
endif

set mypath=	(~sridhar/bin ~sridhar/scripts /etc /usr/lib )
set localpath=	(/usr/new /usr/new/X11 /usr/gnu/bin)

if ( $host == enuxhb || $host == enuxha ) then
	set harrispath= (~csgsa/bin /usr/tmp/threads)
	set path=	( $mypath $localpath $harrispath )
	setenv PATH	$PATH\:$OLDPATH
	unset mypath localpath harrispath
else
	set path=		( $mypath $localpath)
	setenv PATH	$PATH\:$OLDPATH
	unset mypath localpath
endif 

To answer any possible questions:
Setting of PATH affects rsh etc. hence it is in .cshrc.
I need to set my path explicitly bcos not every sysadmin is aware of
security concerns around . in PATH.

)--Dave

In case I messed up, corrections are appreciated! I would guess that
the problem I faced might have happened to the original poster.

Sridhar.
Technical Details
Message-ID: <1992Oct6.182032.26288@ennews.eas.asu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!unipalm!uknet!doc.ic.ac.uk!agate!ames!haven.umd.edu!darwin.sura.net!gatech!asuvax!ennews!enuxhb.eas.asu.edu!sridhar
References: <_4x1Hg08&9@atlantis.psu.edu> <1992Oct5.234128.17631@netcom.com> <-1!1Hqaw$9@atlantis.psu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!unipalm!uknet!doc.ic.ac.uk!agate!ames!haven.umd.edu!darwin.sura.net!gatech!asuvax!ennews!enuxhb.eas.asu.edu!sridhar
From: sridhar@enuxhb.eas.asu.edu (Sridhar Venkataraman)
Newsgroups: netcom.general,netcom.software,news.software.readers
Subject: Re: Printing From trn?
Message-ID: <1992Oct6.182032.26288@ennews.eas.asu.edu>
Date: 6 Oct 92 18:20:32 GMT
References: <_4x1Hg08&9@atlantis.psu.edu> <1992Oct5.234128.17631@netcom.com> <-1!1Hqaw$9@atlantis.psu.edu>
Sender: news@ennews.eas.asu.edu (USENET News System)
Organization: Arizona State University, Tempe AZ
Lines: 62