Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man1/fold.1
Real path: /usr/share/man/man1/fold.1
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. .\" Portions Copyright (c) 1992, The X/Open Company Ltd. All rights reserved. .\" 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 fold 1 "17 Aug 2011" "Oracle Solaris 11.4" "User Commands" .SH NAME fold \- filter for folding lines .SH SYNOPSIS .LP .nf \fBfold\fR [\fB-b\fR | \fB--bytes\fR] [\fB-s\fR | \fB--spaces\fR] [\fB-c\fR | \fB--characters\fR] [\fB-w\fR | \fB--width\fR \fIwidth\fR ] [\fB-width\fR] [\fB--help\fR] [\fIfile\fR]... .fi .SH DESCRIPTION .sp .LP The \fBfold\fR utility is a filter that folds lines from its input files, breaking the lines to have a maximum of \fIwidth\fR column positions (or bytes, if the \fB-b\fR option is specified). Lines are broken by the insertion of a NEWLINE character such that each output line (referred to later in this section as a segment) is the maximum width possible that does not exceed the specified number of column positions (or bytes). A line is not broken in the middle of a character. The behavior is undefined if \fIwidth\fR is less than the number of columns any single character in the input would occupy. .sp .LP The \fB-b\fR and \fB-c\fR options are mutually exclusive and only one may be specified. .sp .LP If the \fBCARRIAGE-RETURN\fR, \fBBACKSPACE\fR, or \fBTAB\fR characters are encountered in the input, and the \fB-b\fR option is not specified, they are treated specially: .sp .ne 2 .mk .na \fB\fBBACKSPACE\fR\fR .ad .RS 19n .rt The current count of line width is decremented by one, although the count never becomes negative. \fBfold\fR does not insert a \fBNEWLINE\fR character immediately before or after any \fBBACKSPACE\fR character. .RE .sp .ne 2 .mk .na \fB\fBCARRIAGE-RETURN\fR\fR .ad .RS 19n .rt The current count of line width is set to \fB0\fR. \fBfold\fR does not insert a \fBNEWLINE\fR character immediately before or after any \fBCARRIAGE-RETURN\fR character. .RE .sp .ne 2 .mk .na \fB\fBTAB\fR\fR .ad .RS 19n .rt Each \fBTAB\fR character encountered advances the column position pointer to the next tab stop. Tab stops are at each column position \fIn\fR such that \fIn\fR modulo 8 equals 1. .RE .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-b\fR, \fB--bytes\fR\fR .ad .br .sp .6 .RS 4n Counts \fIwidth\fR in bytes rather than column positions. May not be specified with \fB-c\fR option. .RE .sp .ne 2 .mk .na \fB\fB-s\fR, \fB--space\fR\fR .ad .br .sp .6 .RS 4n If a segment of a line contains a blank character within the first \fIwidth\fR column positions (or bytes), breaks the line after the last such blank character meeting the width constraints. If there is no blank character meeting the requirements, the \fB-s\fR option has no effect for that output segment of the input line. .RE .sp .ne 2 .mk .na \fB\fB-c\fR, \fB--characters\fR\fR .ad .br .sp .6 .RS 4n Counts width in characters rather than column positions. May not be specified with \fB-b\fR option. .RE .sp .ne 2 .mk .na \fB\fB-w\fR \fIwidth\fR | \fB--width\fR \fIwidth\fR | \fB-width\fR\fR .ad .br .sp .6 .RS 4n Specifies the maximum line length, in column positions (or bytes if \fB-b\fR is specified, or characters for \fB-c\fR). If \fIwidth\fR is not a positive decimal number, an error is returned. The default value is 80. .RE .sp .ne 2 .mk .na \fB\fB--help\fR\fR .ad .br .sp .6 .RS 4n Print usage statement and exit. .RE .SH OPERANDS .sp .LP The following operand is supported: .sp .ne 2 .mk .na \fB\fB\fIfile\fR\fR\fR .ad .RS 8n .rt A path name of a text file to be folded. If no \fIfile\fR operands are specified, the standard input is used. .RE .SH ENVIRONMENT VARIABLES .sp .LP See \fBenviron\fR(7) for descriptions of the following environment variables that affect the execution of \fBfold\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 processed 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 \fBcut\fR(1), \fBpr\fR(1), \fBattributes\fR(7), \fBenviron\fR(7), \fBstandards\fR(7) .SH NOTES .sp .LP \fBfold\fR and \fBcut\fR(1) can be used to create text files out of files with arbitrary line lengths. \fBfold\fR should be used when the contents of long lines need to be kept contiguous. \fBcut\fR should be used when the number of lines (or records) needs to remain constant. .sp .LP \fBfold\fR is frequently used to send text files to line printers that truncate, rather than fold, lines wider than the printer is able to print (usually 80 or 132 column positions). .sp .LP \fBfold\fR might not work correctly if underlining is present.