Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man1/cut.1
Real path: /usr/share/man/man1/cut.1
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Portions Copyright (c) 2009, 2021, Oracle and/or its affiliates. .\" Portions Copyright (c) 1992, The X/Open Company Ltd. All rights reserved. .\" Portions Copyright (c) 1982, 2007, AT&T Knowledge Ventures. .\" Oracle gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear on any product containing this material. .TH cut 1 "11 May 2021" "Oracle Solaris 11.4" "User Commands" .SH NAME cut \- cut out selected fields of each line of a file .SH SYNOPSIS .LP .nf \fB/usr/bin/cut\fR \fB-b\fR \fIlist\fR [\fB-n\fR] [\fIfile\fR]... .fi .LP .nf \fB/usr/bin/cut\fR \fB-c\fR \fIlist\fR [\fIfile\fR]... .fi .LP .nf \fB/usr/bin/cut\fR \fB-f\fR \fIlist\fR [\fB-d\fR \fIdelim\fR] [\fB-s\fR] [\fIfile\fR]... .fi .SH DESCRIPTION .sp .LP \fBcut\fR cuts bytes, characters, or character-delimited fields from one or more files, and concatenates them on standard output. .sp .LP The \fIoption\fR argument list 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 (low-high), which represents all fields from low to high. The second is a positive number preceded by a hyphen (\fB-\fIhigh\fR\fR), which represents all fields from field 1 to high. The last is a positive number followed by a hyphen (\fIlow\fR\fB-\fR), which represents all fields from low to the last field, inclusive. Elements in the list can be repeated, can overlap, and can appear in any order. The order of the output is that of the input. .sp .LP One and only one of \fB-b\fR, \fB-c\fR, or \fB-f\fR options must be specified. .sp .LP If no file is given, or if the file is \fB-\fR, \fBcut\fR cuts from standard input. The start of the file is defined as the current offset. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-b\fR \fIlist\fR\fR .ad .br .sp .6 .RS 4n The \fIlist\fR following \fB-b\fR specifies byte positions (for instance, \fB-b1-72\fR would pass the first \fB72\fR bytes of each line). When \fB-b\fR and \fB-n\fR are used together, \fIlist\fR is adjusted so that no multibyte character is split. .RE .sp .ne 2 .mk .na \fB\fB-c\fR \fIlist\fR\fR .ad .br .sp .6 .RS 4n The list following \fB-c\fR specifies character positions (for instance, \fB-c1-72\fR would pass the first \fB72\fR characters of each line). .RE .sp .ne 2 .mk .na \fB\fB-d\fR \fIdelim\fR\fR .ad .br .sp .6 .RS 4n The character following \fB-d\fR is the field delimiter (\fB-f\fR option only). The default is \fBTAB\fR. Space or other characters with special meaning to the shell must be quoted. \fIdelim\fR can be a multibyte character. .RE .sp .ne 2 .mk .na \fB\fB-f\fR \fIlist\fR\fR .ad .br .sp .6 .RS 4n The \fIlist\fR following \fB-f\fR is a list of fields assumed to be separated in the file by a delimiter character (see \fB-d\fR); for instance, \fB-f1,7\fR copies the first and seventh field only. Lines with no field delimiters are passed through intact (useful for table subheadings), unless \fB-s\fR is specified. .RE .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .br .sp .6 .RS 4n Do not split characters. When \fB-b\fR list and \fB-n\fR are used together, \fIlist\fR is adjusted so that no multibyte character is split. .RE .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .br .sp .6 .RS 4n Suppresses lines with no delimiter characters in case of -f option. Unless specified, lines with no delimiters is passed through untouched. .RE .SH OPERANDS .sp .LP The following operands are supported: .sp .ne 2 .mk .na \fB\fIfile\fR\fR .ad .RS 8n .rt A path name of an input file. If no file operands are specified, or if a file operand is \fB-\fR, the standard input is used. .RE .SH EXAMPLES .LP \fBExample 1\fR Mapping user IDs .sp .LP A mapping of user \fBIDs\fR to names follows: .sp .in +2 .nf example% \fBcut -d: -f1,5 /etc/passwd\fR .fi .in -2 .sp .LP \fBExample 2\fR Setting the Current login name .sp .LP To set \fBname\fR to current login name: .sp .in +2 .nf example$ \fBname=$(who am i | cut -f1 -d' ')\fR .fi .in -2 .sp .SH ENVIRONMENT VARIABLES .sp .LP See \fBenviron\fR(7) for descriptions of the following environment variables that affect the execution of \fBcut\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt All input files were output successfully. .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt An error occurred. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/core-os _ CSI Enabled _ Interface Stability Committed _ Standard See \fBstandards\fR(7). .TE .sp .SH SEE ALSO .sp .LP \fBgrep\fR(1), \fBpaste\fR(1), \fBattributes\fR(7), \fBenviron\fR(7), \fBstandards\fR(7)