Интерактивная система просмотра системных руководств (man-ов)
fmlcut (1)
>> fmlcut (1) ( Solaris man: Команды и прикладные программы пользовательского уровня )
NAME
fmlcut - cut out selected fields of each line of a file
SYNOPSIS
fmlcut-clist [filename]...
fmlcut-flist [-dchar] [-s] [filename]...
DESCRIPTION
The fmlcut function cuts out columns from a table or fields from each line in filename; in database parlance, it implements the projection of a relation. fmlcut can be used as a filter; if filename is not specified or is -, the standard input is read. list specifies
the fields to be selected. Fields can be fixed length (character positions) or variable length (separated by a field delimiter character), depending on whether -c or -f is
specified.
Note: Either the -c or the -f option must be specified.
OPTIONS
list
A comma-separated list of integer field numbers (in increasing order), with optional - to indicate ranges. For example: 1,4,7; 1-3,8; -5,10 (short for 1-5,10); or 3- (short for third through
last field).
-clist
If -c is specified, list specifies character positions (for instance, -c1-72 would pass the first 72 characters of each line). Note: No space intervenes between -c and list.
-flist
If -f is specified, list is a list of fields assumed to be separated
in the file by the default delimiter character, TAB, or by char if the -d option is specified. For example, -f1,7 copies the first and seventh field only. Lines with no delimiter characters are passed through intact (useful for table subheadings), unless -s is specified. Note: No space intervenes
between -f and list. The following options can be used if you have specified -f.
-dchar
If -d is specified, char is the field delimiter. Space or other characters with special meaning
to FMLI must be quoted. Note: No space intervenes between -d and char. The default field delimiter is TAB.
-s
Suppresses lines with no delimiter characters. If -s is not specified, lines with no delimiters will be passed through untouched.
EXAMPLES
Example 1 Getting login IDs and names
The following example gets the login IDs and names.
example% fmlcut -d: -f1,5 /etc/passwd
Example 2 Getting the current login name
The next example gets the current login name.
example% `who am i | fmlcut -f1-d" "`
ATTRIBUTES
See attributes(5) for descriptions of the following
attributes: