Because of a lapse in government funding, the information on this website may not be up to date, transactions submitted via the website may not be processed, and the agency may not be able to respond to inquiries until appropriations are enacted. The NIH Clinical Center (the research hospital of NIH) is open. For more details about its operating status, please visit cc.nih.gov. Updates regarding government operating status and resumption of normal operations can be found at OPM.gov.

Lexical Tools

Fields System Options

Cut out and/or rearrange field(s) from input. This process includes:

  • filter out field(s)
  • rearrange field(s)

from input and then send to output.

This page lists all system options for fields programs

FlagFeature Descriptions
Input Filter Options:
None
Global Behavior Options:
h Print program help information.
hs Print option's hierarchy structure.
i:STR Define input file name. The default is standard input.
o:STR Define output file name. The default is standard output.
p Show the prompt. The default is no prompt.
s:STR Defines a field separator.
v Return the current version identification of fields.
Output Filter Options:
F:INT Specified the field for output to display.

Examples:

  • shell> fields -i:in.data -o:out.data
    Read data from file (in.data) line by line, and send output to file, out.data.
  • shell> fields -v fields.2025
  • shell> fields -F:3:1 -p - Please input a term (type "Ctl-d" to quit) > Field 1|F-2|field 3|f-4 field 3|Field 1