GNU bug report logs - #28140
Here is a possible bug in documentation for 4.4

Previous Next

Package: sed;

Reported by: bamber ward <dlward134 <at> gmail.com>

Date: Fri, 18 Aug 2017 15:35:01 UTC

Severity: minor

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#28140: closed (Here is a possible bug in documentation for 4.4)
Date: Sun, 29 Oct 2017 03:29:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 28 Oct 2017 21:28:22 -0600
with message-id <6f25193e-2aac-12b0-f7b6-f3cf9b804fcc <at> gmail.com>
and subject line Re: bug#28140: Here is a possible bug in documentation for 4.4
has caused the debbugs.gnu.org bug report #28140,
regarding Here is a possible bug in documentation for 4.4
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
28140: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28140
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: bamber ward <dlward134 <at> gmail.com>
To: bug-sed <at> gnu.org
Subject: Here is a possible bug in documentation for 4.4
Date: Fri, 18 Aug 2017 16:34:13 +0100
[Message part 3 (text/plain, inline)]
manual 4.4
section 7-8
 sed -E ':x {N ; s/\n/ /g ; s/(.{40,40})/\1\n/ ; /\n/!bx ; P ;D}'
does not work as described. Change line length , say to 5
  sed -E ':x {N ; s/\n/ /g ; s/(.{5,5})/\1\n/ ; /\n/!bx ; P ;D}'
cat line_wrap_input :
apple grape
pear peach
pomengranate

~/sed/code-> sed -E ':x {N ; s/\n/ /g ; s/(.{5,5})/\1\n/ ; /\n/!bx ; P ;
D}' \  line_wrap_input
apple
 grap
e pear peach pomengranate


~/sed/code->

This seems to work:

#!/bin/sed -rf
# line_wrap.sed (

:x
{
   N
   s/\n/ /g
   :y
   s_(.{40,40})_\1\n_
    /.{40,40}/  P
   s/.*\n//
   ty
   /\n/!bx

}

Best Wishes
David L Ward
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Assaf Gordon <assafgordon <at> gmail.com>
To: bamber ward <dlward134 <at> gmail.com>, 28140-done <at> debbugs.gnu.org
Subject: Re: bug#28140: Here is a possible bug in documentation for 4.4
Date: Sat, 28 Oct 2017 21:28:22 -0600
On 2017-10-12 12:31 AM, Assaf Gordon wrote:
>> On 18/08/17 09:34 AM, bamber ward wrote:
>>> manual 4.4
>>> section 7-8
>>>   sed -E ':x {N ; s/\n/ /g ; s/(.{40,40})/\1\n/ ; /\n/!bx ; P ;D}'
>>> does not work as described.
> 
> I'm thinking of the attached patch,
> which replaces the overly terse (and incorrect) example
> with a longer version with better comments.

Push here:
  https://git.savannah.gnu.org/cgit/sed.git/commit/?id=490b4997

regards,
 - assaf


This bug report was last modified 7 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.