GNU bug report logs -
#42133
Error in 2nd example at www.gnu.org/software/sed/
Previous Next
To reply to this bug, email your comments to 42133 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-sed <at> gnu.org
:
bug#42133
; Package
sed
.
(Tue, 30 Jun 2020 01:10:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
James Waldby <j13 <at> pat7.com>
:
New bug report received and forwarded. Copy sent to
bug-sed <at> gnu.org
.
(Tue, 30 Jun 2020 01:10:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The second example at https://www.gnu.org/software/sed/ is as follows:
# Example: replace every occurrence of 'hello' with 'world' on lines 10-20
$ sed '10,20s/hello/world/' input.txt > output.txt
That sed command does not do what the comment says it does.
For example, if line 10 of input.txt is `hello hello` the output for
that line is `world hello`.
Perhaps add a g switch after the third slash, or alternately, change the
description to something like "on each of lines 10-20, replace the first
occurrence (if any) of 'hello' with 'world'" or,
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 147 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.