Path: utzoo!attcan!uunet!decwrl!sgi!shinobu!odin!ramoth.esd.sgi.com!msc From: msc@ramoth.esd.sgi.com (Mark Callow) Newsgroups: comp.sys.sgi Subject: Re: NeWS Keywords: PWD Message-ID: <1991Jan24.221748.17559@odin.corp.sgi.com> Date: 24 Jan 91 22:17:48 GMT References: <1991Jan23.185734@crocus.medicine.rochester.edu> Sender: news@odin.corp.sgi.com (Net News) Reply-To: msc@sgi.com Organization: Silicon Graphics Inc., Entry Systems Division Lines: 28 In article <1991Jan23.185734@crocus.medicine.rochester.edu>, ajp2o@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 <