NeWS

Mark Callow msc at ramoth.esd.sgi.com
Fri Jan 25 09:17:48 AEST 1991


In article <1991Jan23.185734 at crocus.medicine.rochester.edu>, ajp2o at crocus.medicine.rochester.edu (Anthony J. Persechini) writes:
|> I have been using the news-illustrator program and like it,
|> except that  psh seems to be invoked in the HOME directory
|> rather than in PWD. I would like to be able to write files
|> into the directory where I invoke the program, but
|> (PWD) getenv returns my HOME.  Is there a way to
|> get psh programs to write files into the invoking
|> shell's PWD?

psh sets up a connection to the NeWS server. All the PostScript commands you
are sending to psh are being transmitted to the NeWS server and are executed
there. The NeWS server is started when you login so its PWD is $HOME.

To make the NeWS server read or write files elsewhere you have to give the
full path name of the file. One trick you can use is to automatically generate
the appropriate full path name is to embed the PostScript program as a "here"
document in a shell script.  For example

#! /bin/sh
psh <<EOF
	/File $PWD/foo def
EOF

The shell will substitute $PWD before sending the PostScript statement to psh.
-- 
>From the TARDIS of Mark Callow
msc at ramoth.sgi.com, ...{ames,decwrl}!sgi!msc
"Spirits of genius are always opposed by mediocre minds" - Albert Einstein



More information about the Comp.sys.sgi mailing list