I have accessed MAN for info concerning protocol.using the KSH shell and trying to experiment with cut/sort, i find that i do not quite understand options and or args.as an example: cut - cut out selected columns or fields of each line of a file
SYNOPSIS
cut [ 1;4options ] [file ...]
DESCRIPTION
cut bytes, characters, or character-delimited fields from one or more files,
contatenating them on standard output.
The option argument 1;4list is a comma-separated or blank-separated list of
positive numbers and ranges. Ranges can be of three forms. The first is two
positive integers separated by a hyphen (1;4low-1;4high), which represents all
fields from 1;4low to 1;4high. The second is a positive number preceded by a hyphen
(-1;4high), which represents all fields from field 1 to 1;4high. The last is a
positive number followed by a hyphen (1;4low-), which represents all fields from
1;4low to the last field, inclusive. Elements in the 1;4list can be repeated, can
overlap, and can appear in any order. The order of the output is that of the
input.
One and only one of -b, -c, or -f must be specified.
If no 1;4file is given, or if the 1;4file is -, cut cuts from standard input. The
start of the file is defined as the current offset.
OPTIONS
-b, --bytes=1;4list
cut based on a list of bytes.
-c, --characters=1;4list
cut based on a list of characters.
-d, --delimiter=1;4delim
The field character for the -f option is set to 1;4delim. The
default is the tab character.
-f, --fields=1;4list
cut based on fields separated by the delimiter character
specified with the -d optiion.
-n, --nosplit Do not split characters. Currently ignored.
-r, --reclen=1;4reclen
If 1;4reclen > 0, the input will be read as fixed length records
of length 1;4reclen when used with the -b or -c option.
-s, --suppress|only-delimited
Suppress lines with no delimiter characters, when used with
the -f option. By default, lines with no delimiters will be
passsed in untouched.
-D, --line-delimeter=1;4ldelim
The line delimiter character for the -f option is set to
1;4ldelim. The default is the newline character.
-N, --nonewline Do not output new-lines at end of each record when used with
the -b or -c option.
Can anyone give me an example of the options.i can get the commands to work but NOT the way i wish them to.thank you.
SYNOPSIS
cut [ 1;4options ] [file ...]
DESCRIPTION
cut bytes, characters, or character-delimited fields from one or more files,
contatenating them on standard output.
The option argument 1;4list is a comma-separated or blank-separated list of
positive numbers and ranges. Ranges can be of three forms. The first is two
positive integers separated by a hyphen (1;4low-1;4high), which represents all
fields from 1;4low to 1;4high. The second is a positive number preceded by a hyphen
(-1;4high), which represents all fields from field 1 to 1;4high. The last is a
positive number followed by a hyphen (1;4low-), which represents all fields from
1;4low to the last field, inclusive. Elements in the 1;4list can be repeated, can
overlap, and can appear in any order. The order of the output is that of the
input.
One and only one of -b, -c, or -f must be specified.
If no 1;4file is given, or if the 1;4file is -, cut cuts from standard input. The
start of the file is defined as the current offset.
OPTIONS
-b, --bytes=1;4list
cut based on a list of bytes.
-c, --characters=1;4list
cut based on a list of characters.
-d, --delimiter=1;4delim
The field character for the -f option is set to 1;4delim. The
default is the tab character.
-f, --fields=1;4list
cut based on fields separated by the delimiter character
specified with the -d optiion.
-n, --nosplit Do not split characters. Currently ignored.
-r, --reclen=1;4reclen
If 1;4reclen > 0, the input will be read as fixed length records
of length 1;4reclen when used with the -b or -c option.
-s, --suppress|only-delimited
Suppress lines with no delimiter characters, when used with
the -f option. By default, lines with no delimiters will be
passsed in untouched.
-D, --line-delimeter=1;4ldelim
The line delimiter character for the -f option is set to
1;4ldelim. The default is the newline character.
-N, --nonewline Do not output new-lines at end of each record when used with
the -b or -c option.
Can anyone give me an example of the options.i can get the commands to work but NOT the way i wish them to.thank you.