| fields | proto | fields |
fields -- extract selected fields from a list.
fields files fields
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.
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