PQUERY(L) UNIX Programmer's Manual PQUERY(L) NAME pquery, pquery2 - get the value of a parameter in an IRAF-style parameter file, with possible prompting SYNOPSIS pquery paramfile param [ passign... ] DESCRIPTION pquery gets the value of the param parameter in the speci- fied paramfile and outputs it on the standard output. If the parameter is found in the passign list, the value is taken from the list. If the parameter is not found in the list, a query is generated on stderr for the parameter. In either case, the new value of the parameter is updated in the parameter file (except for hidden parameters IF pquery2 is used -- see OPTIONS section below). Thus, example% pquery src region will result in the query: region (c 512 512 100): c 512 512 50 The input string will be returned on stdout: c 512 512 50 On the other hand, if a region value is already placed on the command line: example% pquery src region region="c 512 512 no query is generated and the value is returned on stdout: c 512 512 50 The pquery program is nearly always used in scripts. A script is run in which the input consists of various parame- ter assignments. One or more pquery's are run within the script to retrieve the value of various parameters. The parameter assignments input on the command line are passed to each invocation of the pquery program. If the user has input a value for the parameter being retrieved on the com- mand line, the user-input value is returned. Otherwise a query is generated on stderr for the parameter. For example, if (`pquery scriptpars doit $*` == "yes") then echo "doing it ..." doit else echo "not doing it ..." endif In this example, if the user runs the script by inputting the "doit" parameter, its value is returned and no query is generated. Otherwise, the user will be queried for a value for that parameter. In either case, the value is updated into the scriptpars parameter file. In searching for the parameter file, .par extension will be added to the paramfile name, if no extension is specified. If the file is not located in the directory specified by the paramfile, the directory pointed to by the UPARM environment variable will be searched. OPTIONS pquery2 can be used to emulate the behavior of pre-v3.4 versions of FTOOLS in that the value of hidden parameters will NOT be changed as a result of a call to pquery2. ENVIRONMENT The environment variable UPARM specifies the directory in which to look for the parameter file, if the pathname of the file is not part of the paramfile specification. SEE ALSO pget(l), plist(l), pquery(l), punlearn(l), pset(l) NOTES AUTHOR The original IRAF parameter interface was developed by the IRAF development group at NOAO, led by Doug Tody. Eric Mandel and John Roll (SAO) developed the IRAF- compatible host interface. Bruce O'Neel developed the current version based on XPI.