Files
oldlinux-files/Minix/2.0.0/wwwman/man1/cut.1.html
2024-02-19 00:21:39 -05:00

74 lines
2.4 KiB
HTML

<HTML>
<HEAD>
<TITLE>cut(1)</TITLE>
</HEAD>
<BODY>
<H1>cut(1)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
cut - select out columns of a file
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>cut</STRONG> <STRONG>[</STRONG> <STRONG>-b</STRONG> | <STRONG>-c</STRONG>] <EM>list</EM> [<EM>file</EM>...]
<STRONG>cut</STRONG> <STRONG>-f</STRONG> <EM>list</EM> [<STRONG>-d</STRONG> <EM>delim</EM>] [ <STRONG>-s</STRONG>]
</PRE>
<H2>OPTIONS</H2><PRE>
<STRONG>-b</STRONG> Cut specified bytes
<STRONG>-c</STRONG> Select out specific characters
<STRONG>-d</STRONG> Change the column delimiter to <EM>delim</EM>
<STRONG>-f</STRONG> Select out specific fields that are separated by the
<STRONG>-i</STRONG> Runs of delimiters count as one
<STRONG>-s</STRONG> Suppres lines with no delimiter characters, when used
</PRE>
<H2>EXAMPLES</H2><PRE>
<STRONG>cut</STRONG> <STRONG>-f</STRONG> <STRONG>2</STRONG> <STRONG>file</STRONG> # Extract field 2
<STRONG>cut</STRONG> <STRONG>-c</STRONG> <STRONG>1-2,5</STRONG> <STRONG>file</STRONG> # Extract character columns 1, 2, and 5
<STRONG>cut</STRONG> <STRONG>-c</STRONG> <STRONG>1-5,7-</STRONG> <STRONG>file</STRONG> # Extract all columns except 6
</PRE>
<H2>DESCRIPTION</H2><PRE>
[<EM>file</EM>...]" delimiter character ( see <EM>delim</EM>)" with the -f option. Lines
with no delimiters are passwd through untouched"
<EM>Cut</EM> extracts one or more fields or columns from a file and writes them on
standard output. If the <STRONG>-f</STRONG> flag is used, the fields are separated by a
delimiter character, normally a tab, but can be changed using the <STRONG>-d</STRONG>
flag. If the <STRONG>-c</STRONG> flag is used, specific columns can be specified. The
list can be comma or BLANK separated. The <STRONG>-f</STRONG> and <STRONG>-c</STRONG> flags are mutually
exclusive. Note: The POSIX1003.2 standard requires the option -b to cut
out specific bytes in a file. It is intended for systems with multi byte
characters (e.g. kanji), since MINIX uses only one byte characters, this
option is equivalent to -c. For the same reason, the option -n has no
effect and is not listed in this manual page.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man1/sed.1.html">sed(1)</A></STRONG>, <STRONG><A HREF="../man9/awk.9.html">awk(9)</A></STRONG>.
</PRE>
</BODY>
</HTML>