Query whether a parameter exists and, if so, get and return its value.
pquery toolname parameter
pquery toolname parameter [ [ para1=value ... ] | value1 ... ]
`pquery' is useful in scripts to get parameter values. It will
prompt the user for parameter values for queried parameters (if not
specified as optional arguments to the command line) and will simply
return the values of hidden parameters.
Since infile in dmcopy.par is a queried parameter, pquery
would prompt the user for the value and then echo that back to STDOUT
which could be grabbed by a script.
pquery dmcopy infile infile='my_file.fits'
Now, since the parameter value has been specified, it
will just return the parameter value (and set it in the parameter file).
echo infile outfile clobber | pquery dmcopy - clob+
Will get the values for all three parameters: infile,
outfile, and clobber. Since clobber is specified on the command line
it will get the value (yes) from there. The other two parameter are
typically 'queried'/automatic parameters and would be prompted for.
parameter file name
Name (plus optional path) of the parameter file to use
Name of parameter to query
The name of the parameter to query. Optionally can use the
various parameter attributes listed below to return those values.
Parameter Attributes
p_value
|
The value of the parameter. If the
parameter is a redirected, this returns the redirection string rather
than what the redirection evaluates too.
|
p_min
|
Minimum value allowed
|
p_max
|
Maximum value allowed
|
p_prompt
|
The parameter prompt
|
If the parameter value is "-", a list of parameters is read
from stdin.
- concept
-
parameter
- modules
-
paramio
- paramio
-
paccess,
paramclose,
paramopen,
pget,
pgets,
plist_names,
pquery,
pset,
punlearn
- tools
-
dmhistory,
dmkeypar,
dmmakepar,
dmreadpar,
paccess,
pdump,
pget,
pline,
plist,
pset,
punlearn
|