Changeset 3613 in kBuild for trunk/src/sed/doc/sed.1
- Timestamp:
- Sep 19, 2024 12:34:43 AM (7 months ago)
- Location:
- trunk/src/sed
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sed
-
Property svn:mergeinfo
set to
/vendor/sed/current merged eligible
-
Property svn:mergeinfo
set to
-
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" 3 3 .SH NAME 4 4 sed \- stream editor for filtering and transforming text 5 5 .SH SYNOPSIS 6 .B sed 7 [\fIOPTION\fR]... \fI{script-only-if-no-other-script} \fR[\fIinput-file\fR]... 6 .nf 7 sed [-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 8 15 .SH DESCRIPTION 9 16 .ds sd \fIsed\fP … … 25 32 suppress automatic printing of pattern space 26 33 .HP 27 \fB\-e\fR script, \fB\-\-expression\fR=\fIscript\fR 34 \fB\-\-debug\fR 35 .IP 36 annotate program execution 37 .HP 38 \fB\-e\fR script, \fB\-\-expression\fR=\fI\,script\/\fR 28 39 .IP 29 40 add the script to the commands to be executed 30 41 .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 44 add the contents of script\-file to the commands to be executed 45 .HP 46 \fB\-\-follow\-symlinks\fR 47 .IP 48 follow symlinks when processing in place 49 .HP 50 \fB\-i[SUFFIX]\fR, \fB\-\-in\-place\fR[=\fI\,SUFFIX\/\fR] 51 .IP 52 edit files in place (makes backup if SUFFIX supplied) 53 .HP 54 \fB\-l\fR N, \fB\-\-line\-length\fR=\fI\,N\/\fR 55 .IP 56 specify the desired line\-wrap length for the `l' command 42 57 .HP 43 58 \fB\-\-posix\fR … … 45 60 disable all GNU extensions. 46 61 .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 64 use extended regular expressions in the script 65 (for portability use POSIX \fB\-E\fR). 50 66 .HP 51 67 \fB\-s\fR, \fB\-\-separate\fR 52 68 .IP 53 consider files as separate rather than as a single continuous 54 long stream. 69 consider files as separate rather than as a single, 70 continuous long stream. 71 .HP 72 \fB\-\-sandbox\fR 73 .IP 74 operate in sandbox mode (disable e/r/w commands). 55 75 .HP 56 76 \fB\-u\fR, \fB\-\-unbuffered\fR … … 58 78 load minimal amounts of data from the input files and flush 59 79 the output buffers more often 80 .HP 81 \fB\-z\fR, \fB\-\-null\-data\fR 82 .IP 83 separate lines by NUL characters 60 84 .TP 61 85 \fB\-\-help\fR … … 66 90 .PP 67 91 If 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. All92 non\-option argument is taken as the sed script to interpret. All 69 93 remaining arguments are names of input files; if no input files are 70 94 specified, then the standard input is read. 71 95 .PP 72 E-mail bug reports to: [email protected] . 73 Be sure to include the word ``sed'' somewhere in the ``Subject:'' field. 96 GNU sed home page: <https://www.gnu.org/software/sed/>. 97 General help using GNU software: <https://www.gnu.org/gethelp/>. 98 E\-mail bug reports to: <bug\[email protected]>. 74 99 .SH "COMMAND SYNOPSIS" 75 100 This is just a brief synopsis of \*(sd commands to serve as … … 89 114 .RI # comment 90 115 The comment extends until the next newline (or the end of a 91 .B -e116 .B \-e 92 117 script fragment). 93 118 .TP … … 114 139 which has each embedded newline preceded by a backslash. 115 140 .TP 116 q 141 q [\fIexit-code\fR] 117 142 Immediately 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 143 any more input, except that if auto-print is not disabled 144 the current pattern space will be printed. The exit code 145 argument is a GNU extension. 146 .TP 147 Q [\fIexit-code\fR] 123 148 Immediately quit the \*(sd script without processing 124 any more input. 149 any more input. This is a GNU extension. 125 150 .TP 126 151 .RI r\ filename … … 131 156 Append a line read from 132 157 .IR filename . 158 Each invocation of the command reads a line from the file. 159 This is a GNU extension. 133 160 .SS 134 161 Commands which accept address ranges … … 144 171 is omitted, branch to end of script. 145 172 .TP 146 .RI t\ label147 If a s/// has done a successful substitution since the148 last input line was read and since the last t or T149 command, then branch to150 .IR label ;151 if152 .I label153 is omitted, branch to end of script.154 .TP155 .RI T\ label156 If no s/// has done a successful substitution since the157 last input line was read and since the last t or T158 command, then branch to159 .IR label ;160 if161 .I label162 is omitted, branch to end of script.163 .TP164 173 c \e 165 174 .TP … … 174 183 .TP 175 184 D 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. 185 If pattern space contains no newline, start a normal new cycle as if 186 the d command was issued. Otherwise, delete text in the pattern 187 space up to the first newline, and restart cycle with the resultant 188 pattern space, without reading a new line of input. 179 189 .TP 180 190 h H … … 184 194 Copy/append hold space to pattern space. 185 195 .TP 186 x187 Exchange the contents of the hold and pattern spaces.188 .TP189 196 l 190 197 List out the current line in a ``visually unambiguous'' form. 198 .TP 199 .RI l\ width 200 List out the current line in a ``visually unambiguous'' form, 201 breaking it at 202 .I width 203 characters. This is a GNU extension. 191 204 .TP 192 205 n N … … 215 228 .IR regexp . 216 229 .TP 230 .RI t\ label 231 If a s/// has done a successful substitution since the 232 last input line was read and since the last t or T 233 command, then branch to 234 .IR label ; 235 if 236 .I label 237 is omitted, branch to end of script. 238 .TP 239 .RI T\ label 240 If no s/// has done a successful substitution since the 241 last input line was read and since the last t or T 242 command, then branch to 243 .IR label ; 244 if 245 .I label 246 is omitted, branch to end of script. This is a GNU 247 extension. 248 .TP 217 249 .RI w\ filename 218 250 Write the current pattern space to … … 222 254 Write the first line of the current pattern space to 223 255 .IR filename . 256 This is a GNU extension. 257 .TP 258 x 259 Exchange the contents of the hold and pattern spaces. 224 260 .TP 225 261 .RI y/ source / dest / … … 269 305 .I number 270 306 Match only the specified line 271 .IR number . 307 .IR number 308 (which increments cumulatively across files, unless the 309 .B \-s 310 option is specified on the command line). 272 311 .TP 273 312 .IR first ~ step … … 276 315 line starting with line 277 316 .IR first . 278 For example, ``sed -n 1~2p'' will print all the odd-numbered lines in317 For example, ``sed \-n 1~2p'' will print all the odd-numbered lines in 279 318 the input stream, and the address 2~5 will match every fifth line, 280 starting with the second. (This is an extension.) 319 starting with the second. 320 .I first 321 can be zero; in this case, \*(sd operates as if it were equal to 322 .IR step . 323 (This is an extension.) 281 324 .TP 282 325 $ … … 286 329 Match lines matching the regular expression 287 330 .IR regexp . 331 Matching is performed on the current pattern space, which 332 can be modified with commands such as ``s///''. 288 333 .TP 289 334 .BI \fR\e\fPc regexp c … … 309 354 .RI 1, addr2 310 355 form will still be at the beginning of its range. 356 This works only when 357 .I addr2 358 is a regular expression. 311 359 .TP 312 360 .IR addr1 ,+ N … … 337 385 .BR \et , 338 386 and other sequences. 387 The \fI-E\fP option switches to using extended regular expressions instead; 388 it has been supported for years by GNU sed, and is now 389 included in POSIX. 339 390 .SH BUGS 340 391 .PP 341 392 E-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] . 394 Also, please include the output of ``sed \-\-version'' in the body 345 395 of your report if at all possible. 396 .SH AUTHOR 397 Written by Jay Fenlason, Tom Lord, Ken Pizzini, 398 Paolo Bonzini, Jim Meyering, and Assaf Gordon. 399 .PP 400 This sed program was built with SELinux support. 401 SELinux is enabled on this system. 402 .PP 403 GNU sed home page: <https://www.gnu.org/software/sed/>. 404 General help using GNU software: <https://www.gnu.org/gethelp/>. 405 E\-mail bug reports to: <bug\[email protected]>. 346 406 .SH COPYRIGHT 347 Copyright \(co 2003 Free Software Foundation, Inc. 407 Copyright \(co 2022 Free Software Foundation, Inc. 408 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. 348 409 .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. 410 This is free software: you are free to change and redistribute it. 411 There is NO WARRANTY, to the extent permitted by law. 352 412 .SH "SEE ALSO" 353 413 .BR awk (1),
Note:
See TracChangeset
for help on using the changeset viewer.