Dec 122017
 
UNIX-like column/field filter program.
File CUT.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
UNIX-like column/field filter program.
File Name File Size Zip Size Zip Type
CUT.DOC 3499 989 deflated
CUT.EXE 10702 6511 deflated

Download File CUT.ZIP Here

Contents of the CUT.DOC file





CUT - Field Cut Utility


NAME

CUT - cut out specified fields from each line of a file

SYNOPSIS

cut [-s] [-t] [-d] <-c | -f> file ...

DESCRIPTION

Cut will cut out fields from each line of the files
specified as input arguments. The fields specified may be
of fixed length, or separated by any number of delimiter
characters. If no file arguments are specified, cut will
act as a filter, using standard input.

Cut may be used with the following options;

-f
the list following the -f option is a comma
separated list of integers specifying the
field numbers which will be cut from the
input.

-c
specify character column numbers from which
output will be cut, e.g., 5-80, 1,8, etc.
All characters within the specified columns
will be output.

Note that either the -c or -f options, but not both
must be specified.

-d
All characters in the specified string will
be considered delimiters when used with the
-f option. The default delimiters are space
and tab. The tab character can be repre-
sented as \t. Spaces and other characters
with special meaning must be enclosed in
quotes.

-s
The -s option will suppress the output of
lines which contain no delimiters. The
default is to output the entirety of lines
which do not contain any delimiters. This
option is only used with the -f option.





CUT - Field Cut Utility Page 1
Copyright (c) 1986, Syncom, Inc.








CUT - Field Cut Utility



-t
The -t option specifies a string to be used
as a format string for output. Field argu-
ments are placed by use of the %s format
specifier. Note that since the '%' character
is treated specially by command.com in the
execution of batch files, it must be
specified as %% when used in a batch file.


EXAMPLES
dir | cut -f1,2 -t"%s.%s"

will output the (reformatted) file names in a directory,
(plus some other junk).


cut -c1,20 file1 >file2

will output the first 20 columns from file1 to file2.
































CUT - Field Cut Utility Page 2
Copyright (c) 1986, Syncom, Inc.







 December 12, 2017  Add comments

Leave a Reply