IRAF help page for package proto, program fields

from NOAO fields -- extract selected fields from a list.USAGEPARAMETERSDESCRIPTIONEXAMPLESSEE ALSO

fields -- extract selected fields from a list.


USAGE

fields files fields


PARAMETERS

files

File or files from which the fields are to be extracted.

fields

The fields to be extracted.

lines = 1-9999

The lines from which the fields are to be extracted. If multiple files are being extracted, the same lines apply to each file.

quit_if_missing = no

This flag determines the task behavior when a field is missing from the specified line. If quit_if_missing = yes, the task exits and an error is reported.

print_file_names = no

If print_file_name = yes, the first string of each output line of extracted fields is the file name.


DESCRIPTION

The list processing tool fields is used to extract whitespace separated fields from the specified files and lines. The input to this task can be either the standard input or a list of files; output is a new list of the extracted fields.

The fields of a line are numbered from 1 up to a newline character; those fields to be extracted are specified as a range of numbers. If a specified field is missing from a selected line the action taken is determined by the quit_if_missing flag; fields will either continue processing after printing a warning message, or call an error and exit.


EXAMPLES

1. Reverse the order of the 5 columns in list file "list".

	cl> fields list 5-1 > newlist

2. Extract columns 1 and 3 from file "newlist" and pipe them to task graph.

	cl> fields newlist 1,3 | graph

SEE ALSO

SEE ALSO, joinlines, xtools.ranges,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu