From unknown Mon Jun 23 02:22:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20684 <20684@debbugs.gnu.org> To: bug#20684 <20684@debbugs.gnu.org> Subject: Status: errors in sed manual 4.2.2 Reply-To: bug#20684 <20684@debbugs.gnu.org> Date: Mon, 23 Jun 2025 09:22:20 +0000 retitle 20684 errors in sed manual 4.2.2 reassign 20684 sed submitter 20684 bamber ward severity 20684 normal tag 20684 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 28 13:06:57 2015 Received: (at submit) by debbugs.gnu.org; 28 May 2015 17:06:58 +0000 Received: from localhost ([127.0.0.1]:59746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yy1Gg-0001zz-Rl for submit@debbugs.gnu.org; Thu, 28 May 2015 13:06:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59714) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yy16h-0001k2-Iy for submit@debbugs.gnu.org; Thu, 28 May 2015 12:56:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy16b-0003FL-4Y for submit@debbugs.gnu.org; Thu, 28 May 2015 12:56:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy16b-0003FF-1e for submit@debbugs.gnu.org; Thu, 28 May 2015 12:56:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy16Z-00056F-Ni for bug-sed@gnu.org; Thu, 28 May 2015 12:56:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy16Y-0003EH-LV for bug-sed@gnu.org; Thu, 28 May 2015 12:56:27 -0400 Received: from mail-ig0-x231.google.com ([2607:f8b0:4001:c05::231]:37206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy16Y-0003Dv-Ck for bug-sed@gnu.org; Thu, 28 May 2015 12:56:26 -0400 Received: by igbsb11 with SMTP id sb11so44276572igb.0 for ; Thu, 28 May 2015 09:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=R1qGmHkYlXiCyDtSGH3RxafK3JQMEDcJDCciRWoXE1o=; b=w/b/R8J+7+JVi8ZUWuiuyWHJ3Altt+wQpqoFZg/BwUJhxQ1v29TnK321qpxW56BPnq G2RwoUTOyIaeDserzRTFo0DgCtlAk+ngWZfFV4aOQF/HI+k6Z55tGuf3esdjm/uz6lfM EOJOnwRM1z8sjpasMbwDXgQBDhAipJJWIgcUgYgXaxSNW9YXr8ri0khOiAYZYPe1Tl7i qCHGgfEwayrwVcwB8fWRg8cY0ZtaNbtR7z08nu277Pt0W2VHI3+jK0PfUHHPIrvvlGLp M8cG4ONvb1oK+2FeuVMpBQ4ijvLoC4RheIFNKU2EHnuEMwZPf+Ch1AKjYmxZDOO+YfvF cEbA== MIME-Version: 1.0 X-Received: by 10.50.97.33 with SMTP id dx1mr44711230igb.1.1432832184687; Thu, 28 May 2015 09:56:24 -0700 (PDT) Received: by 10.79.19.130 with HTTP; Thu, 28 May 2015 09:56:24 -0700 (PDT) In-Reply-To: References: Date: Thu, 28 May 2015 17:56:24 +0100 Message-ID: Subject: Re: errors in sed manual 4.2.2 From: bamber ward To: bug-sed@gnu.org Content-Type: multipart/alternative; boundary=047d7b10c8896423de0517273dff X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 28 May 2015 13:06:53 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --047d7b10c8896423de0517273dff Content-Type: text/plain; charset=UTF-8 Apologies. Wrong on every details. Sorry for wasting your time. On Sat, Aug 9, 2014 at 3:15 PM, bamber ward wrote: > I have tried to construct examples to test out \`(backslash backtick) but > have not succeeded in getting the responses I want. I assume that > backtick is the same as backquote. Backticks as in `command`. > for instance, > echo cat | sed "s/\`cat/bingo/" > gives cat > echo cat | sed "s/\`cat\'/bingo" # double quotes because of single quote > gives cat > but > echo cat | sed "s/cat\'/=/" gives > = > > > On Sat, Aug 9, 2014 at 2:13 PM, bamber ward wrote: > >> Unfortunately, errors in the documentation seem to persist. Somewhat >> disapointing but correcting >> bugs is, I find, a good way to really understand a language. >> >> Section 4.7 >> add >> s/.*// after last h >> to see why just run the program as given in the manual. >> >> Sections 4.9 and 4.10 >> in S!{ >> h >> b >> } >> add s/.*// after h >> omit final p >> without these changes you get, for >> a file containing, >> the cat sat >> on the mat # no new line here >> baa >> 23 >> 23 >> >> instead of 23 >> >> 4.15 >> I see you have added the -n option to this edition to try to correct >> this script. >> However, the comment in the script should state print the second(not >> first) duplicated line >> The program still does not give the correct output >> cat uniq_d3.txt >> dog >> dog >> cat >> cat >> pony >> gives output: >> dog >> cat >> cat >> pony >> >> instead of : >> dog >> cat >> >> The script prints out the last line regardless and if the last two lines >> are different it prints both. >> Replacing the last $b by >> $ s/.*/ / seems to fix it >> Possibilities >> Last two lines different.Can't be duplicates so delete >> Last two lines duplicates. >> Last line added in the code block. >> Last but one line deleted >> Then Last line printed so ok to delete pattern space at end. >> 4.17 >> Need to remove the first p in the last script to avoid duplicated output >> >> I hope you find this helpful >> Best Wishes >> >> David >> > > --047d7b10c8896423de0517273dff Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Apologies. Wrong on every details. Sorry for wasting your = time.

On= Sat, Aug 9, 2014 at 3:15 PM, bamber ward <dlward134@gmail.com> wrote:
I have trie= d to construct examples to test out \`(backslash backtick) but have not suc= ceeded =C2=A0in getting the responses =C2=A0I want. I assume that backtick = is the same as backquote. Backticks as in `command`.
for instance,
echo cat | sed "s/\`cat/bingo/"
gives cat
echo cat | sed "s/\`cat\'/bingo" # doubl= e quotes because of single quote
gives cat
but
echo cat | sed "s/cat\'/=3D/" gives=C2=A0
=3D<= /div>


On Sat, Aug 9, 2014 at 2:13 PM, bambe= r ward <dlward134@gmail.com> wrote:

Unfortunately,=C2=A0 errors in the documentation = seem to persist. Somewhat disapointing but correcting
bugs is, I find, a good way to really understand a language.
=C2=A0
Section 4.7
add
s/.*// after last h
to see why just run the program as given in the manual.

Sections=C2=A0 4.9=C2=A0 and 4.10
in S!{
=C2=A0 h
=C2=A0 b
}
add s/.*// after h
omit final p
without these changes you get, for
a file containing,
the cat sat
on the mat # no new line here
baa
23
23
=C2=A0
instead of 23

4.15
I see you have added the -n option=C2=A0=C2=A0 to this edition to try to correct this script.
However, the comment in the script should state print the second(not first) duplicated line
The program still does not=C2=A0 give the correct output
cat uniq_d3.txt
dog
dog
cat
cat
pony
gives output:
dog
cat
cat
pony

instead of :
dog
cat

The script prints out the last line regardless and if the last two lines ar= e different it prints both.
Replacing the last $b by
$ s/.*/ / seems to fix it
Possibilities
Last two lines different.Can't be duplicates so delete
Last two lines duplicates.
Last line added in the code block.
Last but one line deleted
Then Last line printed so ok to delete pattern space at end.
4.17
Need to remove the first p in the last script to avoid duplicated output
I hope you find this helpful
Best Wishes=C2=A0

David



--047d7b10c8896423de0517273dff-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 18:32:30 2017 Received: (at control) by debbugs.gnu.org; 24 Jan 2017 23:32:30 +0000 Received: from localhost ([127.0.0.1]:41080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWAZi-0000uw-62 for submit@debbugs.gnu.org; Tue, 24 Jan 2017 18:32:30 -0500 Received: from mail-qk0-f171.google.com ([209.85.220.171]:36196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWAZh-0000ui-3w for control@debbugs.gnu.org; Tue, 24 Jan 2017 18:32:29 -0500 Received: by mail-qk0-f171.google.com with SMTP id 11so58584990qkl.3 for ; Tue, 24 Jan 2017 15:32:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:mime-version:content-disposition:user-agent; bh=tGpForb//DT1LalNRZNmuPB1BkHswkrXciNwHlizIlI=; b=Ak8rqMoM7uKC3XNbEehocb9fBoJje9C03tGws8usfD1A4SAKW48c8gGY5Uc0Qbxo2v 6RTW6Qmpqpv8fQVu5rJzJQgJZARqhqyEOZv+88Piwu7UIKwIGvqVeNiUfAxA175dEP01 WK0tQv94wtRqCqezjo9gIO7xDTeCHhh0hxKfoXfR3O941pl2fT88CbuynPL4/wCmNcCV JOVGMCaNMKMA6em5m2RBZsdNzAGd9EV65Bxrhn0/X+pt0QWdsEOBVCrnYXcHAuFBARfl mpT3c9MNvwLbw7+77WNMxxv51djCBwTUGWoL7AOXaCneTGipbyeiCnpxb0k00OSFmIEO /mdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:message-id:mime-version :content-disposition:user-agent; bh=tGpForb//DT1LalNRZNmuPB1BkHswkrXciNwHlizIlI=; b=e0FTMjf5UddyCmuXqswO5EgYSORupSDA/kpZ0BiR61RqMN1JS/RwWBo+KzxKTNaVaD NPQJdD1NNPORDU+DzxjLJOag2uxSSes5NSojY+OUCnnBXwQ2iayVJH482NeFQ1+pYmTc +7GJb7mcsvlKq0hlBMFy6+Art8mLlbibbPB9gnBC1WK0YEI8hPdDQ53PJ+OUxJiQ+3Wh phQBKb+uDg9nRPqFSHNJBJyIesHqQIuv4AG9qYzPzbGFz2qf7xRk97+jt3X046bnTPXr SwZMTVYDnBPuHcNyL6QAszWuc8iyVGvsWVJJZiGJL70zAIdWndTOa/JZKHsqIrRHTi/x N8ng== X-Gm-Message-State: AIkVDXLX8Lt0cybcYamonPqh5Ee+ObGoYdotBm+M5mTTu4YR0yJAwFEsONL8zsXAJxAk7Q== X-Received: by 10.55.148.71 with SMTP id w68mr26274630qkd.130.1485300743495; Tue, 24 Jan 2017 15:32:23 -0800 (PST) Received: from gmail.com (housegordon.org. [104.236.108.240]) by smtp.gmail.com with ESMTPSA id h33sm16008837qtc.42.2017.01.24.15.32.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 15:32:23 -0800 (PST) Date: Tue, 24 Jan 2017 23:31:52 +0000 From: Assaf Gordon To: control@debbugs.gnu.org Message-ID: <20170124233152.GB9668@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.8 (/) tags 20572 notabug close 20572 tags 20684 notabug close 20684 tags 20786 fixed close 20786 tags 22943 notabug close 22943 tags 23415 notabug close 23415 tags 23493 notabug close 23493 tag 23832 notabug close 23832 tag 23848 fixed close 23848 tag 24072 notabug close 24072 tag 25358 fixed close 25358 tag 25371 fixed close 25371 tag 25377 fixed close 25377 tag 25390 fixed close 25390 stop From unknown Mon Jun 23 02:22:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 22 Feb 2017 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator