siegel@pprg.unm.edu (Josh Siegel) (07/24/90)
Newsgroups: comp.windows.news Subject: Re: Finding xnews version outside xnews? Summary: no version primitive Expires: References: <1990Jul22.135206.455@postmaster@turing.ac.uk> Sender: Followup-To: comp.windows.news Distribution: all Organization: Sun Microsystems, Mt. View, Ca. Keywords: hack, version, primitive In article <1990Jul22.135206.455@postmaster@turing.ac.uk> rudolf@morlich.turing.ac.uk (Jim Rudolf) writes: >For configuration purposes I'm trying to find out what version >of xnews a machine has from within a shell script. I tried something >like the following line, but I got an error message voicing xnews's >displeasure: > >morlich% xnews 'version =' >Process: 0x1b9094 (Unnamed process) Error: unimplemented version is defined in (NeWS/basics.ps) and is not a PostScript primitive. > >Using the -init flag and/or double quotes didn't seem to help. > >BTW, I'm running OpenWindows1.0.1. >So my questions are: > a) Why am I having trouble passing PostScript as an arg to xnews? OpenWindows 1.0.x does not take a '-init' option % xnews '2 2 add ==' OpenWindows 2.x does % xnews -init '2 2 add ==' > b) Is there an alternate way to find out the version? $OPENWINHOME/bin/xnews -help |& grep "-init" And then look at the status... :-) You also can: egrep "^/version" $OPENWINHOME/etc/NeWS/basics.ps | sed -e 's/^.*(\(.*\)).*$/\1/g' Hope this helps. > -- Jim Josh Siegel siegel@sun.com -- Josh Siegel (siegel@hc.dspo.gov) Friends don't let Friends eat Cherry Zingers
naughton@wind.Eng.Sun.COM (Patrick Naughton) (07/25/90)
In article <28176@pprg.unm.edu>, siegel@pprg.unm.edu (Josh Siegel) writes: |> |> Newsgroups: comp.windows.news |> Subject: Re: Finding xnews version outside xnews? |> |> In article <1990Jul22.135206.455@postmaster@turing.ac.uk> rudolf@morlich.turing.ac.uk (Jim Rudolf) writes: |> >For configuration purposes I'm trying to find out what version |> >of xnews a machine has from within a shell script. This should do the trick... (older versions may not need the -init.) xnews -init " /currentpacking false def /setpacking { pop } def (NeWS/basics.ps) (r) file cvx exec version = shutdownserver " ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080