Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!netcom!amdcad!sun!exodus!bendenweyr!flar From: flar@bendenweyr.Eng.Sun.COM (Jim Graham) Newsgroups: comp.windows.news Subject: Re: using psh in Openwindows 2.0 on 386i Keywords: Sun386i Openwindows psh postscript Message-ID: <6654@exodus.Eng.Sun.COM> Date: 25 Jan 91 21:41:05 GMT References: <3799@tdw206.ed.ray.com> Sender: news@exodus.Eng.Sun.COM Reply-To: flar@bendenweyr.Eng.Sun.COM (Jim Graham) Organization: Sun Microsystems, Inc. Lines: 40 In article <3799@tdw206.ed.ray.com>, heiser@tdw201.ed.ray.com writes: |> I just got a bunch of NeWS programs -- and would like to try them out. |> When I type 'psh filename.ps', though, either nothing happens, or I get |> a whole series of error messages in my console window. (I don't know |> postscript language, so I don't know what they mean). After looking at an example of one of the NeWS programs that Bill is trying to psh, I notice that they depend on some discontinued bit of psh functionality. In Version 2.0, the capability of the psh command to parse "$n" argument descriptions was removed since it was causing problems when people tried to psh PostScript files to the server. It was decided that psh would transfer its input to the server without interpretation. To restore this functionality, simply use the bourne shell as follows: Append the following two lines to the top of the file: #! /bin/sh psh << PSH_EOF Then append the following line to the end of the file: PSH_EOF This passes the whole script through psh, but the bourne shell will preprocess the Postscript looking for the "$n" tokens and replacing them with the corresponding command line arguments before it hands it to psh. Now you just have to make the script executable using: chmod +x myscript.ps (You might want to rename it to remove the .ps suffix...) Now you can just execute the script directly without typing "psh". ...jim