Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!uokmax!unmvax!pprg.unm.edu!siegel From: siegel@pprg.unm.edu (Josh Siegel) Newsgroups: comp.windows.news Subject: Re: Finding the version of OpenWindows Message-ID: <28176@pprg.unm.edu> Date: 23 Jul 90 23:51:04 GMT Organization: U. of New Mexico, Albuquerque Lines: 59 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