- description:
sddsquery prints a summary of the SDDS header for a data set. It also prints bare lists of
names of defined entities, suitable to use with shell scripts that need to detect the existence
of entities in the data set. Finally, it will create an SDDS file containing information about
what is in the header.
- examples: Get information on the contents of a file:
Get a list of the column names only:
sddsquery APS.twi -columnList
Get a list of the column names into a shell variable
set names = ‘sddsquery APS.twi -columnList -delimiter=" "‘
Get a list of the column names into an SDDS file
sddsquery APS.twi -columnList -sddsOutput=APS.twi.names
- synopsis:
sddsquery SDDSfilename [SDDSfilename...] [-sddsOutput[=filename]] [{-arrayList |
-columnList | -parameterList | -version}] [-delimiter=delimitingString]
[-appendUnits[=bare]] [-readAll]
- files: The input filenames may name arbitrary SDDS files.
If -sddsOutput is given, the output normally contains one page for each data class (i.e., array,
parameter, and column). The following elements are defined:
- Columns (all string type):
- Name — The name of the element.
- Units — The units of the data.
- Symbol — The symbol for the element.
- Format — The format string for the element (e.g., “%f”).
- Type — The SDDS data type name (e.g., double, float, etc.).
- Description — The description for the element.
- Group — The group name (for array elements only).
- Parameters:
- Class — The SDDS class for the present page.
- Filename — The filename being described by the present page.
- switches:
Normal operation of sddsquery results in a printout summarizing the header of each file. If one of
the options is given, however, this printout will not appear. Instead, the selected list of names
appears for each file.
- sddsOutput[={\em filename}]] — Requests that output be delivered in SDDS
protocol. If no filename is given, the output is delivered to the standard output.
- arrayList — In non-SDDS output mode, requests that a list of array names be printed
to the standard output, one name per line. In SDDS output mode, requests that only
array information be provided.
- columnList — In non-SDDS output mode, requests that a list of column names be
printed to the standard output, one name per line. In SDDS output mode, requests that
only column information be provided.
- parameterList — In non-SDDS output mode, requests that a list of parameter names
be printed to the standard output, one name per line. In SDDS output mode, requests
that only parameter information be provided.
- -version — Requests that the SDDS version number of the file be printed to the
standard output. Valid in non-SDDS output mode only.
- -delimiter=delimitingString — Requests that listed items be separated by the given
string. By default, the delimiter is a newline. Valid in non-SDDS output mode only.
- -appendunits[=bare] — Requests that the units of each item be printed directly
following the item name. Valid in non-SDDS output mode only. If the bare qualifier is
not given, then the units are enclosed in parentheses.
- -readAll — Forces sddsquery to read the entire file. On some operating systems this
is necessary when querying compressed files to prevent “Broken Pipe” errors. For large
files, use of this option will make sddsquery slower.
- see also:
- author: M. Borland, ANL/APS.