GNU bug report logs -
#20684
errors in sed manual 4.2.2
Previous Next
Reported by: bamber ward <dlward134 <at> gmail.com>
Date: Thu, 28 May 2015 17:07:01 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Apologies. Wrong on every details. Sorry for wasting your time.
On Sat, Aug 9, 2014 at 3:15 PM, bamber ward <dlward134 <at> gmail.com> 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 <dlward134 <at> gmail.com> 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
>>
>
>
[Message part 2 (text/html, inline)]
This bug report was last modified 8 years and 122 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.