VirtualBox

Changeset 3613 in kBuild for trunk/src/sed/doc/sed.1


Ignore:
Timestamp:
Sep 19, 2024 12:34:43 AM (7 months ago)
Author:
bird
Message:

src/sed: Merged in changes between 4.1.5 and 4.9 from the vendor branch. (svn merge /vendor/sed/4.1.5 /vendor/sed/current .)

Location:
trunk/src/sed
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sed

  • trunk/src/sed/doc/sed.1

    r599 r3613  
    1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.28.
    2 .TH SED "1" "February 2006" "sed version 4.1.4" "User Commands"
     1.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.48.5.
     2.TH SED "1" "November 2022" "GNU sed 4.9" "User Commands"
    33.SH NAME
    44sed \- stream editor for filtering and transforming text
    55.SH SYNOPSIS
    6 .B sed
    7 [\fIOPTION\fR]... \fI{script-only-if-no-other-script} \fR[\fIinput-file\fR]...
     6.nf
     7sed [-V] [--version] [--help] [-n] [--quiet] [--silent]
     8    [-l N] [--line-length=N] [-u] [--unbuffered]
     9    [-E] [-r] [--regexp-extended]
     10    [-e script] [--expression=script]
     11    [-f script-file] [--file=script-file]
     12    [script-if-no-other-script]
     13    [file...]
     14.fi
    815.SH DESCRIPTION
    916.ds sd \fIsed\fP
     
    2532suppress automatic printing of pattern space
    2633.HP
    27 \fB\-e\fR script, \fB\-\-expression\fR=\fIscript\fR
     34\fB\-\-debug\fR
     35.IP
     36annotate program execution
     37.HP
     38\fB\-e\fR script, \fB\-\-expression\fR=\fI\,script\/\fR
    2839.IP
    2940add the script to the commands to be executed
    3041.HP
    31 \fB\-f\fR script-file, \fB\-\-file\fR=\fIscript\-file\fR
    32 .IP
    33 add the contents of script-file to the commands to be executed
    34 .HP
    35 \fB\-i[SUFFIX]\fR, \fB\-\-in\-place\fR[=\fISUFFIX\fR]
    36 .IP
    37 edit files in place (makes backup if extension supplied)
    38 .HP
    39 \fB\-l\fR N, \fB\-\-line\-length\fR=\fIN\fR
    40 .IP
    41 specify the desired line-wrap length for the `l' command
     42\fB\-f\fR script\-file, \fB\-\-file\fR=\fI\,script\-file\/\fR
     43.IP
     44add the contents of script\-file to the commands to be executed
     45.HP
     46\fB\-\-follow\-symlinks\fR
     47.IP
     48follow symlinks when processing in place
     49.HP
     50\fB\-i[SUFFIX]\fR, \fB\-\-in\-place\fR[=\fI\,SUFFIX\/\fR]
     51.IP
     52edit files in place (makes backup if SUFFIX supplied)
     53.HP
     54\fB\-l\fR N, \fB\-\-line\-length\fR=\fI\,N\/\fR
     55.IP
     56specify the desired line\-wrap length for the `l' command
    4257.HP
    4358\fB\-\-posix\fR
     
    4560disable all GNU extensions.
    4661.HP
    47 \fB\-r\fR, \fB\-\-regexp\-extended\fR
    48 .IP
    49 use extended regular expressions in the script.
     62\fB\-E\fR, \fB\-r\fR, \fB\-\-regexp\-extended\fR
     63.IP
     64use extended regular expressions in the script
     65(for portability use POSIX \fB\-E\fR).
    5066.HP
    5167\fB\-s\fR, \fB\-\-separate\fR
    5268.IP
    53 consider files as separate rather than as a single continuous
    54 long stream.
     69consider files as separate rather than as a single,
     70continuous long stream.
     71.HP
     72\fB\-\-sandbox\fR
     73.IP
     74operate in sandbox mode (disable e/r/w commands).
    5575.HP
    5676\fB\-u\fR, \fB\-\-unbuffered\fR
     
    5878load minimal amounts of data from the input files and flush
    5979the output buffers more often
     80.HP
     81\fB\-z\fR, \fB\-\-null\-data\fR
     82.IP
     83separate lines by NUL characters
    6084.TP
    6185\fB\-\-help\fR
     
    6690.PP
    6791If no \fB\-e\fR, \fB\-\-expression\fR, \fB\-f\fR, or \fB\-\-file\fR option is given, then the first
    68 non-option argument is taken as the sed script to interpret.  All
     92non\-option argument is taken as the sed script to interpret.  All
    6993remaining arguments are names of input files; if no input files are
    7094specified, then the standard input is read.
    7195.PP
    72 E-mail bug reports to: [email protected] .
    73 Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
     96GNU sed home page: <https://www.gnu.org/software/sed/>.
     97General help using GNU software: <https://www.gnu.org/gethelp/>.
     98E\-mail bug reports to: <bug\[email protected]>.
    7499.SH "COMMAND SYNOPSIS"
    75100This is just a brief synopsis of \*(sd commands to serve as
     
    89114.RI # comment
    90115The comment extends until the next newline (or the end of a
    91 .B -e
     116.B \-e
    92117script fragment).
    93118.TP
     
    114139which has each embedded newline preceded by a backslash.
    115140.TP
    116 q
     141q [\fIexit-code\fR]
    117142Immediately quit the \*(sd script without processing
    118 any more input,
    119 except that if auto-print is not disabled
    120 the current pattern space will be printed.
    121 .TP
    122 Q
     143any more input, except that if auto-print is not disabled
     144the current pattern space will be printed.  The exit code
     145argument is a GNU extension.
     146.TP
     147Q [\fIexit-code\fR]
    123148Immediately quit the \*(sd script without processing
    124 any more input.
     149any more input.  This is a GNU extension.
    125150.TP
    126151.RI r\  filename
     
    131156Append a line read from
    132157.IR filename .
     158Each invocation of the command reads a line from the file.
     159This is a GNU extension.
    133160.SS
    134161Commands which accept address ranges
     
    144171is omitted, branch to end of script.
    145172.TP
    146 .RI t\  label
    147 If a s/// has done a successful substitution since the
    148 last input line was read and since the last t or T
    149 command, then branch to
    150 .IR label ;
    151 if
    152 .I label
    153 is omitted, branch to end of script.
    154 .TP
    155 .RI T\  label
    156 If no s/// has done a successful substitution since the
    157 last input line was read and since the last t or T
    158 command, then branch to
    159 .IR label ;
    160 if
    161 .I label
    162 is omitted, branch to end of script.
    163 .TP
    164173c \e
    165174.TP
     
    174183.TP
    175184D
    176 Delete up to the first embedded newline in the pattern space.
    177 Start next cycle, but skip reading from the input
    178 if there is still data in the pattern space.
     185If pattern space contains no newline, start a normal new cycle as if
     186the d command was issued.  Otherwise, delete text in the pattern
     187space up to the first newline, and restart cycle with the resultant
     188pattern space, without reading a new line of input.
    179189.TP
    180190h H
     
    184194Copy/append hold space to pattern space.
    185195.TP
    186 x
    187 Exchange the contents of the hold and pattern spaces.
    188 .TP
    189196l
    190197List out the current line in a ``visually unambiguous'' form.
     198.TP
     199.RI l\  width
     200List out the current line in a ``visually unambiguous'' form,
     201breaking it at
     202.I width
     203characters.  This is a GNU extension.
    191204.TP
    192205n N
     
    215228.IR regexp .
    216229.TP
     230.RI t\  label
     231If a s/// has done a successful substitution since the
     232last input line was read and since the last t or T
     233command, then branch to
     234.IR label ;
     235if
     236.I label
     237is omitted, branch to end of script.
     238.TP
     239.RI T\  label
     240If no s/// has done a successful substitution since the
     241last input line was read and since the last t or T
     242command, then branch to
     243.IR label ;
     244if
     245.I label
     246is omitted, branch to end of script.  This is a GNU
     247extension.
     248.TP
    217249.RI w\  filename
    218250Write the current pattern space to
     
    222254Write the first line of the current pattern space to
    223255.IR filename .
     256This is a GNU extension.
     257.TP
     258x
     259Exchange the contents of the hold and pattern spaces.
    224260.TP
    225261.RI y/ source / dest /
     
    269305.I number
    270306Match only the specified line
    271 .IR number .
     307.IR number
     308(which increments cumulatively across files, unless the
     309.B \-s
     310option is specified on the command line).
    272311.TP
    273312.IR first ~ step
     
    276315line starting with line
    277316.IR first .
    278 For example, ``sed -n 1~2p'' will print all the odd-numbered lines in
     317For example, ``sed \-n 1~2p'' will print all the odd-numbered lines in
    279318the input stream, and the address 2~5 will match every fifth line,
    280 starting with the second. (This is an extension.)
     319starting with the second.
     320.I first
     321can be zero; in this case, \*(sd operates as if it were equal to
     322.IR step .
     323(This is an extension.)
    281324.TP
    282325$
     
    286329Match lines matching the regular expression
    287330.IR regexp .
     331Matching is performed on the current pattern space, which
     332can be modified with commands such as ``s///''.
    288333.TP
    289334.BI \fR\e\fPc regexp c
     
    309354.RI 1, addr2
    310355form will still be at the beginning of its range.
     356This works only when
     357.I addr2
     358is a regular expression.
    311359.TP
    312360.IR addr1 ,+ N
     
    337385.BR \et ,
    338386and other sequences.
     387The \fI-E\fP option switches to using extended regular expressions instead;
     388it has been supported for years by GNU sed, and is now
     389included in POSIX.
    339390.SH BUGS
    340391.PP
    341392E-mail bug reports to
    342 .BR [email protected] .
    343 Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
    344 Also, please include the output of ``sed --version'' in the body
     393.BR [email protected] .
     394Also, please include the output of ``sed \-\-version'' in the body
    345395of your report if at all possible.
     396.SH AUTHOR
     397Written by Jay Fenlason, Tom Lord, Ken Pizzini,
     398Paolo Bonzini, Jim Meyering, and Assaf Gordon.
     399.PP
     400This sed program was built with SELinux support.
     401SELinux is enabled on this system.
     402.PP
     403GNU sed home page: <https://www.gnu.org/software/sed/>.
     404General help using GNU software: <https://www.gnu.org/gethelp/>.
     405E\-mail bug reports to: <bug\[email protected]>.
    346406.SH COPYRIGHT
    347 Copyright \(co 2003 Free Software Foundation, Inc.
     407Copyright \(co 2022 Free Software Foundation, Inc.
     408License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
    348409.br
    349 This is free software; see the source for copying conditions.  There is NO
    350 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
    351 to the extent permitted by law.
     410This is free software: you are free to change and redistribute it.
     411There is NO WARRANTY, to the extent permitted by law.
    352412.SH "SEE ALSO"
    353413.BR awk (1),
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette