getinfo - Returns information about dataset attributes

SYNOPSIS

getinfo  [ parameter=value ]  [ inputfile ... ]

Parameters are: attr_name, attr_value.

DESCRIPTION

getinfo retrieves and reports specific information about an attribute from one or more datasets (datasets). By default, the attribute's value(s) are reported. However, the optional parameter attr_value can be used to specify that the attribute's type, size or units be reported instead. The information is written to standard output.

getfino is designed to be used in shell scripts that provide post-processing for datasets.

PARAMETERS

attr_name

Specifies the name of the attribute and, by default, causes the attribute's value(s) to be reported.

There is no default.

attr_value

OPTIONAL. Allows the specification of an alternative attribute characteristic to be output.

Valid options are [value, type, units, length]. The default is value.

EXAMPLES

Use in shell scripts as follows (example is Bourne shell):

X = `getinfo attr_name=sensor myfile`

if ($X == 'avhrr')  ...

Y = `getinfo attr_name=sensorient attr_value=units myfile`

if ($Y == 'degrees')  ...

Use on the command line as follows:

% getinfo attr_name=sensor myfile
avhrr
% getinfo attr_name=sensor attr_value=type myfile
std_sensor
% getinfo attr_name=sensor attr_value=size myfile
1

SEE ALSO

datasets, editvar, formats, passinfo, setattr, varinfo.


Last Update: $Date: 1998/05/29 17:24:44 $