Home | History | Annotate | Download | only in doc

Lines Matching full:line

64                                command-line options.
133 `sed' may be invoked with the following command-line options:
140 Print a usage message briefly summarizing these command-line
187 `--line-length=N'
188 Specify the default line-wrap length for the `l' command. A
209 separated by a carriage return _and_ a line feed character, and
212 this special processing and considering lines to end at a line
218 case, if the file that is specified on the command line is a
234 line as a single continuous long stream. This GNU `sed' extension
237 files, line numbers are relative to the start of each file, `$'
238 refers to the last line of each file, and files invoked from the
250 the command-line, then the first non-option argument on the command
251 line is taken to be the SCRIPT to be executed.
253 If any command-line parameters remain after processing the above,
306 input: first, `sed' reads one line from the input stream, removes any
315 next cycle starts for the next input line.
324 (1) Actually, if `sed' prints a line without the terminating
338 Specifying a line number will match only that line in the input.
343 This GNU extension matches every STEPth line starting with line
345 non-negative N such that the current line-number equals FIRST + (N
347 `1~2'; to pick every third line starting with the second, `2~3'
348 would be used; to pick every fifth line starting with the tenth,
352 This address matches the last line of the last file of input, or
353 the last line of each file when the `-i' or `-s' options are
357 This will select any line which matches the regular expression
389 end of the buffer. `M' stands for `multi-line'.
401 match will start with the line _following_ the line which matched the
405 If the second address is a NUMBER less than (or equal to) the line
406 matching the first address, then only the one line is matched.
411 A line number of `0' can be used in an address specification like
413 input line too. In other words, `0,/REGEXP/' is similar to
414 `1,/REGEXP/', except that if ADDR2 matches the very first line of
421 sense; there is no 0-th line and commands which are given the `0'
428 Matches ADDR1 and the lines following ADDR1 until the next line
429 whose input line number is a multiple of N.
510 each line (*note How `sed' works: Execution Cycle.). So, it is a
512 lines where `#include' is the first thing on line--if there are
659 support a single one-line comment, and then only when the very
664 a comment in the first line of your script and that comment begins
683 command-line option.
687 regardless, replace the pattern space with the next line of input.
801 end of the buffer. `M' stands for `multi-line'.
838 line is read.
844 other than a whitespace-`\' sequence, then the text of this line,
846 taken as the first line of the TEXT block. (This enables a
847 simplification in scripting a one-line add.) This extension also
863 the last line (or in place of each line, if no addresses were
870 Print out the current input line number (with a trailing newline).
876 indicate the split; the end of each line is marked with a `$'.
878 N specifies the desired line-wrap length; a length of 0 (zero)
880 specified on the command line is used. The N parameter is a GNU
888 input line is read. Note that if FILENAME cannot be read, it is
902 line is read; all `w' commands (including instances of `w' flag on
909 (without reading a new line of input), otherwise start a normal
913 Add a newline to the pattern space, then append the next line of
967 since the last input line was read or conditional branch was taken.
999 if N is omitted, the default as specified on the command line is
1018 $d Quit silently on the last line
1019 N Read another line, silently
1024 Queue a line of FILENAME to be read and inserted into the output
1026 line is read. Note that if FILENAME cannot be read, or if its end
1027 is reached, no line is appended, without any error indication.
1030 supported for the file name, which reads a line from the standard
1035 `s'ubstitutions since the last input line was read or conditional
1147 from `^' in multi-line mode.
1151 `$' in multi-line mode.
1219 # add a newline and 80 spaces to end of line
1259 # incr last digit only. The first line adds a most-significant
1375 # now line contains original path+file, while
1379 # add converted file name to line, which now contains
1407 # if no occurrence of "=()" print and load next line
1412 # save the line in case this is a var like FOO="() "
1415 # if the next line has a brace, we quit because
1420 # print the old line
1423 # work on the new line now
1447 # Reverse a line. Begin embedding the line between two newlines
1488 # reverse all lines of input, i.e. first line became last, ...
1490 # from the second line, the buffer (which contains all previous lines)
1491 # is *appended* to current line, so, the order will be reversed
1494 # on the last line we're done -- print everything
1521 It uses `sed' to print the line number, then groups lines two by two
1525 The algorithm used for incrementing uses both buffers, so the line
1529 command). The line number for the next line is then composed and
1534 # Prime the pump on the first line
1538 # Add the correct line number before the pattern
1546 # Get the line number from hold space; add a zero
1547 # if we're going to add a digit on the next line
1622 simply add the number of characters on the current line as units, and
1627 On the last line, we convert the abacus form back to decimal. For
1659 # On the last line, convert back to decimal
1689 words on the line is converted to a single `a' (in the previous script
1772 indeed possible. N is encoded in the second line, before the bang
1786 adding a line and deleting the oldest (the substitution command on the
1787 second line works like a `D' command but does not restart the loop).
1799 however, we stop using the hold space to keep inter-line state, and
1800 instead use `N' and `D' to slide pattern space by one line:
1811 Note how the first, second and fourth line are inactive after the
1813 on the last line of input, appending the next input line to pattern
1814 space, and removing the first line.
1829 # On the last line, print and exit
1839 # If the `N' command had added the last line, print and exit
1847 As you can see, we mantain a 2-line window using `P' and `D'. This
1867 # Loop until we get a different line
1877 # The last line cannot be followed by duplicates
1894 # Search for a duplicate line --- until that, print what you find.
1915 # Remove the last instance of the duplicate line
1929 The first leaves a blank line at the beginning and end if there are
1948 beginning. It does leave a single blank line at end if one was there.
1957 # on an empty line we remove it and all the following
1969 a line.
1985 # no, don't have chars: got an empty line
1987 # get next, if last line we finish here so no trailing
1995 # what we want to do is to squeeze, insert a blank line artificially
2007 implementations have been known to limit line lengths (for the pattern
2010 8192 byte line lengths. GNU `sed' has no built-in limit on line length;
2053 error--> sed: file sedscr line 1: Unknown option to 's'
2069 `N' command on the last line
2071 command is issued on the last line of a file. GNU `sed' prints
2142 There is no line 0. 0 is a special address that is only used to
2144 you write `1,/abc/d' and the first line includes the word `abc',
2147 probably wanted is to delete every line up to the first one
2227 exception of the `sed' commands and command-line options.
2232 * 0 address: Reporting Bugs. (line 103)
2233 * Additional reading about sed: Other Resources. (line 6)
2234 * ADDR1,+N: Addresses. (line 78)
2235 * ADDR1,~N: Addresses. (line 78)
2236 * Address, as a regular expression: Addresses. (line 27)
2237 * Address, last line: Addresses. (line 22)
2238 * Address, numeric: Addresses. (line 8)
2239 * Addresses, in sed scripts: Addresses. (line 6)
2240 * Append hold space to pattern space: Other Commands. (line 125)
2241 * Append next input line to pattern space: Other Commands. (line 105)
2242 * Append pattern space to hold space: Other Commands. (line 117)
2243 * Appending text after a line: Other Commands. (line 27)
2244 * Backreferences, in regular expressions: The "s" Command. (line 19)
2245 * Branch to a label, if s/// failed: Extended Commands. (line 63)
2247 (line 22)
2249 (line 18)
2250 * Buffer spaces, pattern and hold: Execution Cycle. (line 6)
2251 * Bugs, reporting: Reporting Bugs. (line 6)
2252 * Case-insensitive matching: The "s" Command. (line 94)
2253 * Caveat -- #n on first line: Common Commands. (line 20)
2254 * Command groups: Common Commands. (line 50)
2255 * Comments, in scripts: Common Commands. (line 12)
2256 * Conditional branch <1>: Extended Commands. (line 63)
2258 (line 22)
2259 * Copy hold space into pattern space: Other Commands. (line 121)
2260 * Copy pattern space into hold space: Other Commands. (line 113)
2261 * Delete first line from pattern space: Other Commands. (line 99)
2262 * Disabling autoprint, from command line: Invoking sed. (line 34)
2263 * empty regular expression: Addresses. (line 31)
2264 * Emptying pattern space <1>: Reporting Bugs. (line 130)
2265 * Emptying pattern space: Extended Commands. (line 85)
2266 * Evaluate Bourne-shell commands: Extended Commands. (line 12)
2268 (line 85)
2269 * Exchange hold space with pattern space: Other Commands. (line 129)
2270 * Excluding lines: Addresses. (line 101)
2271 * Extended regular expressions, choosing: Invoking sed. (line 113)
2272 * Extended regular expressions, syntax: Extended regexps. (line 6)
2273 * Files to be processed as input: Invoking sed. (line 141)
2275 (line 11)
2276 * Global substitution: The "s" Command. (line 51)
2277 * GNU extensions, /dev/stderr file <1>: Other Commands. (line 88)
2278 * GNU extensions, /dev/stderr file: The "s" Command. (line 78)
2279 * GNU extensions, /dev/stdin file <1>: Extended Commands. (line 53)
2280 * GNU extensions, /dev/stdin file: Other Commands. (line 78)
2281 * GNU extensions, /dev/stdout file <1>: Other Commands. (line 88)
2282 * GNU extensions, /dev/stdout file <2>: The "s" Command. (line 78)
2283 * GNU extensions, /dev/stdout file: Invoking sed. (line 149)
2284 * GNU extensions, 0 address <1>: Reporting Bugs. (line 103)
2285 * GNU extensions, 0 address: Addresses. (line 78)
2286 * GNU extensions, 0,ADDR2 addressing: Addresses. (line 78)
2287 * GNU extensions, ADDR1,+N addressing: Addresses. (line 78)
2288 * GNU extensions, ADDR1,~N addressing: Addresses. (line 78)
2289 * GNU extensions, branch if s/// failed: Extended Commands. (line 63)
2291 line 23)
2293 (line 69)
2294 * GNU extensions, disabling: Invoking sed. (line 81)
2295 * GNU extensions, emptying pattern space <1>: Reporting Bugs. (line 130)
2296 * GNU extensions, emptying pattern space: Extended Commands. (line 85)
2298 (line 12)
2300 (line 85)
2301 * GNU extensions, extended regular expressions: Invoking sed. (line 113)
2303 (line 57)
2304 * GNU extensions, I modifier <1>: The "s" Command. (line 94)
2305 * GNU extensions, I modifier: Addresses. (line 49)
2306 * GNU extensions, in-place editing <1>: Reporting Bugs. (line 85)
2307 * GNU extensions, in-place editing: Invoking sed. (line 51)
2308 * GNU extensions, L command: Extended Commands. (line 26)
2309 * GNU extensions, M modifier: The "s" Command. (line 99)
2311 (line 31)
2312 * GNU extensions, N~M addresses: Addresses. (line 13)
2313 * GNU extensions, quitting silently: Extended Commands. (line 36)
2314 * GNU extensions, R command: Extended Commands. (line 53)
2315 * GNU extensions, reading a file a line at a time: Extended Commands.
2316 (line 53)
2317 * GNU extensions, reformatting paragraphs: Extended Commands. (line 26)
2319 (line 36)
2320 * GNU extensions, returning an exit code: Common Commands. (line 30)
2321 * GNU extensions, setting line length: Other Commands. (line 65)
2322 * GNU extensions, special escapes <1>: Reporting Bugs. (line 78)
2323 * GNU extensions, special escapes: Escapes. (line 6)
2324 * GNU extensions, special two-address forms: Addresses. (line 78)
2325 * GNU extensions, subprocesses <1>: Extended Commands. (line 12)
2326 * GNU extensions, subprocesses: The "s" Command. (line 85)
2328 (line 51)
2330 (line 26)
2332 (line 25)
2333 * GNU extensions, unlimited line length: Limitations. (line 6)
2334 * GNU extensions, writing first line to a file: Extended Commands.
2335 (line 80)
2337 (line 18)
2338 * Greedy regular expression matching: Regular Expressions. (line 143)
2339 * Grouping commands: Common Commands. (line 50)
2340 * Hold space, appending from pattern space: Other Commands. (line 117)
2341 * Hold space, appending to pattern space: Other Commands. (line 125)
2342 * Hold space, copy into pattern space: Other Commands. (line 121)
2343 * Hold space, copying pattern space into: Other Commands. (line 113)
2344 * Hold space, definition: Execution Cycle. (line 6)
2345 * Hold space, exchange with pattern space: Other Commands. (line 129)
2346 * In-place editing: Reporting Bugs. (line 85)
2347 * In-place editing, activating: Invoking sed. (line 51)
2349 (line 62)
2350 * Inserting text before a line: Other Commands. (line 46)
2352 (line 14)
2353 * Last line, selecting: Addresses. (line 22)
2354 * Line length, setting <1>: Other Commands. (line 65)
2355 * Line length, setting: Invoking sed. (line 76)
2356 * Line number, printing: Other Commands. (line 62)
2357 * Line selection: Addresses. (line 6)
2358 * Line, selecting by number: Addresses. (line 8)
2359 * Line, selecting by regular expression match: Addresses. (line 27)
2360 * Line, selecting last: Addresses. (line 22)
2361 * List pattern space: Other Commands. (line 65)
2363 (line 57)
2364 * Next input line, append to pattern space: Other Commands. (line 105)
2365 * Next input line, replace pattern space with: Common Commands.
2366 (line 44)
2367 * Non-bugs, 0 address: Reporting Bugs. (line 103)
2368 * Non-bugs, in-place editing: Reporting Bugs. (line 85)
2369 * Non-bugs, localization-related: Reporting Bugs. (line 112)
2370 * Non-bugs, N command on the last line: Reporting Bugs. (line 31)
2371 * Non-bugs, regex syntax clashes: Reporting Bugs. (line 51)
2372 * Parenthesized substrings: The "s" Command. (line 19)
2373 * Pattern space, definition: Execution Cycle. (line 6)
2374 * Perl-style regular expressions, multiline: Addresses. (line 54)
2375 * Portability, comments: Common Commands. (line 15)
2376 * Portability, line length limitations: Limitations. (line 6)
2377 * Portability, N command on the last line: Reporting Bugs. (line 31)
2379 (line 105)
2380 * POSIXLY_CORRECT behavior, enabling: Invoking sed. (line 84)
2381 * POSIXLY_CORRECT behavior, escapes: Escapes. (line 11)
2382 * POSIXLY_CORRECT behavior, N command: Reporting Bugs. (line 46)
2383 * Print first line from pattern space: Other Commands. (line 110)
2384 * Printing line number: Other Commands. (line 62)
2385 * Printing text unambiguously: Other Commands. (line 65)
2386 * Quitting <1>: Extended Commands. (line 36)
2387 * Quitting: Common Commands. (line 30)
2388 * Range of lines: Addresses. (line 65)
2389 * Range with start address of zero: Addresses. (line 78)
2390 * Read next input line: Common Commands. (line 44)
2391 * Read text from a file <1>: Extended Commands. (line 53)
2392 * Read text from a file: Other Commands. (line 78)
2393 * Reformat pattern space: Extended Commands. (line 26)
2394 * Reformatting paragraphs: Extended Commands. (line 26)
2396 (line 113)
2398 (line 121)
2399 * Replacing all text matching regexp in a line: The "s" Command.
2400 (line 51)
2401 * Replacing only Nth match of regexp in a line: The "s" Command.
2402 (line 55)
2403 * Replacing selected lines with other text: Other Commands. (line 52)
2404 * Requiring GNU sed: Extended Commands. (line 69)
2405 * Script structure: sed Programs. (line 6)
2406 * Script, from a file: Invoking sed. (line 46)
2407 * Script, from command line: Invoking sed. (line 41)
2408 * sed program structure: sed Programs. (line 6)
2409 * Selecting lines to process: Addresses. (line 6)
2410 * Selecting non-matching lines: Addresses. (line 101)
2411 * Several lines, selecting: Addresses. (line 65)
2412 * Slash character, in regular expressions: Addresses. (line 41)
2413 * Spaces, pattern and hold: Execution Cycle. (line 6)
2414 * Special addressing forms: Addresses. (line 78)
2415 * Standard input, processing as input: Invoking sed. (line 143)
2416 * Stream editor: Introduction. (line 6)
2417 * Subprocesses <1>: Extended Commands. (line 12)
2418 * Subprocesses: The "s" Command. (line 85)
2419 * Substitution of text, options: The "s" Command. (line 47)
2420 * Text, appending: Other Commands. (line 27)
2421 * Text, deleting: Common Commands. (line 36)
2422 * Text, insertion: Other Commands. (line 46)
2423 * Text, printing: Common Commands. (line 39)
2424 * Text, printing after substitution: The "s" Command. (line 65)
2426 (line 78)
2427 * Transliteration: Other Commands. (line 14)
2428 * Unbuffered I/O, choosing: Invoking sed. (line 131)
2429 * Usage summary, printing: Invoking sed. (line 28)
2430 * Version, printing: Invoking sed. (line 24)
2431 * Working on separate files: Invoking sed. (line 121)
2432 * Write first line to a file: Extended Commands. (line 80)
2433 * Write to a file: Other Commands. (line 88)
2434 * Zero, as range start address: Addresses. (line 78)
2442 This is an alphabetical list of all `sed' commands and command-line
2448 * # (comments): Common Commands. (line 12)
2449 * --binary: Invoking sed. (line 93)
2450 * --expression: Invoking sed. (line 41)
2451 * --file: Invoking sed. (line 46)
2452 * --follow-symlinks: Invoking sed. (line 104)
2453 * --help: Invoking sed. (line 28)
2454 * --in-place: Invoking sed. (line 51)
2455 * --line-length: Invoking sed. (line 76)
2456 * --quiet: Invoking sed. (line 34)
2457 * --regexp-extended: Invoking sed. (line 113)
2458 * --silent: Invoking sed. (line 34)
2459 * --unbuffered: Invoking sed. (line 131)
2460 * --version: Invoking sed. (line 24)
2461 * -b: Invoking sed. (line 93)
2462 * -e: Invoking sed. (line 41)
2463 * -f: Invoking sed. (line 46)
2464 * -i: Invoking sed. (line 51)
2465 * -l: Invoking sed. (line 76)
2466 * -n: Invoking sed. (line 34)
2467 * -n, forcing from within a script: Common Commands. (line 20)
2468 * -r: Invoking sed. (line 113)
2469 * -u: Invoking sed. (line 131)
2471 (line 14)
2472 * = (print line number) command: Other Commands. (line 62)
2473 * a (append text lines) command: Other Commands. (line 27)
2475 (line 18)
2476 * c (change to text lines) command: Other Commands. (line 52)
2477 * D (delete first line) command: Other Commands. (line 99)
2478 * d (delete) command: Common Commands. (line 36)
2479 * e (evaluate) command: Extended Commands. (line 12)
2480 * G (appending Get) command: Other Commands. (line 125)
2481 * g (get) command: Other Commands. (line 121)
2482 * H (append Hold) command: Other Commands. (line 117)
2483 * h (hold) command: Other Commands. (line 113)
2484 * i (insert text lines) command: Other Commands. (line 46)
2485 * L (fLow paragraphs) command: Extended Commands. (line 26)
2486 * l (list unambiguously) command: Other Commands. (line 65)
2487 * N (append Next line) command: Other Commands. (line 105)
2488 * n (next-line) command: Common Commands. (line 44)
2489 * P (print first line) command: Other Commands. (line 110)
2490 * p (print) command: Common Commands. (line 39)
2491 * q (quit) command: Common Commands. (line 30)
2492 * Q (silent Quit) command: Extended Commands. (line 36)
2493 * r (read file) command: Other Commands. (line 78)
2494 * R (read line) command: Extended Commands. (line 53)
2495 * s command, option flags: The "s" Command. (line 47)
2496 * T (test and branch if failed) command: Extended Commands. (line 63)
2498 (line 22)
2499 * v (version) command: Extended Commands. (line 69)
2500 * w (write file) command: Other Commands. (line 88)
2501 * W (write first line) command: Extended Commands. (line 80)
2502 * x (eXchange) command: Other Commands. (line 129)
2503 * y (transliterate) command: Other Commands. (line 14)
2504 * z (Zap) command: Extended Commands. (line 85)
2505 * {} command grouping: Common Commands. (line 50)