Wsh and pathnames.

Dave Ciemiewicz ciemo at bananapc.wpd.sgi.com
Fri Jun 9 02:58:34 AEST 1989


In article <34885 at sgi.SGI.COM>, kipp at warp.wpd.sgi.com (Kipp Hickman) writes:
> 
> When you run wsh -c, it inherits its environment from whatever
> started it.  If you start it from your shell, then it will inherit
> the environment from the shell, and all should be fine and dandy.
> 
> If you start it from 4sight, then it inherits the environment from
> 4sight.  This is the most common problem, because 4sight is started
> before your environment is loaded up.  A quick-and-dirty solution
> is to add the following (sample) line to your user.ps in your
> home directory:
> 
> (PATH) (/d/kipp/bin:/usr/local/bin:/usr/sbin:/usr/bsd:/usr/bin:/bin:/usr/etc:/etc:/usr/bin/X11:/usr/local/bin/ctools) putenv
> 
> this does mean you have a copy of the information in your
> .login/.profile, but thats why its quick-and-dirty.  Better yet, is
> to use the ``exporttonews'' program (I believe its floating around
> on the net somewhere).
> 
> 				kipp
> 
> 

exporttonews is a script I wrote sometime back that has not been posted to
the net (unless someone did it for me :^).  Just so you won't go searching
for it here it is in shar file form.

					--- Dave

----- CUT HERE ----------------------------------------------------------------
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by ciemo on Thu Jun  8 09:44:57 PDT 1989
# Contents:  exporttonews
 
echo x - exporttonews
sed 's/^@//' > "exporttonews" <<'@//E*O*F exporttonews//'
#! /bin/sh

#
#  NAME
#	exporttonews - export environment variables to 4Sight's
#	 	(the news_server's) environment
#
#  SYNOPSIS
#	exporttonews environmentvarname ...
#
#  DESCRIPTION
#	On SGI machines, 4Sight (the news_server) is started up before a
#	user's .profile or .login configuration file is processed so the
#	4Sight has no notion of the user's custom environment.
#
#	exporttonews will take exported environment variables and place them
#	in the 4Sight's environment.
#
#  EXAMPLE
#	In your .profile (sh,ksh), you might export your PATH.
#
#		PATH=$PATH:'/additional/path'
#		export PATH
#		exporttonews PATH
#
#	In your .login (csh,tcsh), you might export your path.
#
#		set path ($path /additional/path)
#		exporttonews PATH
#  NOTE
#	The variables specified to exporttonews must be exported to the
#	environment.
#
#  AUTHOR
#	Dave Ciemiewicz (ciemo at sgi.com), Silicon Graphics, 1988
#

for environmentvar in $*
do
    eval value=$"$environmentvar"
    echo "($environmentvar) ($value) putenv" | psh
done
@//E*O*F exporttonews//
chmod u=rwx,g=rx,o=rx exporttonews
 
exit 0
----- CUT HERE ----------------------------------------------------------------



More information about the Comp.sys.sgi mailing list