GNU bug report logs -
#25675
Errors in gnu manual 4.3
Previous Next
Reported by: bamber ward <dlward134 <at> gmail.com>
Date: Fri, 10 Feb 2017 14:47:01 UTC
Severity: normal
Tags: moreinfo
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
manual 4.3
Here is some errors I have found in this manual ( Well I think that they
are errors)
\B
$ echo "abc %-= def." | sed 's/\w/X/g'
aXbXc X%X-X=X dXeXf.X # should \B not \w
7-12
superfluous : next in program?
7-17
# The two lines are identical. Undo the effect of the n command.
should be N command
7-18
# Print the first of the duplicated lines
should be second
7-20 first script
leaves blanks at end.
Say file have final 3 blank lines. On the last line N fails, exits script
and prints out
pattern space. The following seems to correct this:
-----
#!/bin/sed -f
# on empty lines, join with next
# Note there is a star in the regexp
:x
$ b c # added b c
/^\n*$/ {
N
bx
}
# now, squeeze all '\n'
:c // added
s/^\(\n\)*/\1/ # only apply to completely blank lines
~/sed/code-> sedsed -d -f ./cat_s.sed ./cat_s.txt
PATT:$
HOLD:$
COMM::x
COMM:$ b c
COMM:/^\n*$/ {
COMM:N
PATT:\n$
HOLD:$
COMM:b x
COMM:$ b c
COMM:/^\n*$/ {
COMM:N
PATT:\n\ntwo blank lines above$
HOLD:$
COMM:b x
COMM:$ b c
COMM:/^\n*$/ {
COMM::c
COMM:s/^\(\n\)*/\1/
PATT:\ntwo blank lines above$
HOLD:$
two blank lines above
PATT:apple$
HOLD:$
COMM::x
COMM:$ b c
COMM:/^\n*$/ {
COMM::c
COMM:s/^\(\n\)*/\1/
PATT:apple$
HOLD:$
apple
PATT:pear$
HOLD:$
COMM::x
COMM:$ b c
COMM:/^\n*$/ {
COMM::c
COMM:s/^\(\n\)*/\1/
PATT:pear$
HOLD:$
pear
PATT:five blank lines follow$
HOLD:$
COMM::x
COMM:$ b c
COMM:/^\n*$/ {
COMM::c
COMM:s/^\(\n\)*/\1/
PATT:five blank lines follow$
HOLD:$
five blank lines follow
PATT:$
HOLD:$
COMM::x
COMM:$ b c
COMM:/^\n*$/ {
COMM:N
PATT:\n$
HOLD:$
COMM:b x
COMM:$ b c
COMM:/^\n*$/ {
COMM:N
PATT:\n\n$
HOLD:$
COMM:b x
COMM:$ b c
COMM:/^\n*$/ {
COMM:N
PATT:\n\n\n$
HOLD:$
COMM:b x
COMM:$ b c
COMM:/^\n*$/ {
COMM:N
PATT:\n\n\n\n$
HOLD:$
COMM:b x
COMM:$ b c
COMM:/^\n*$/ {
COMM:N
PATT:\n\n\n\n\n$
HOLD:$
COMM:b x
COMM:$ b c
COMM:s/^\(\n\)*/\1/
PATT:\n$
HOLD:$
~/sed/code->
~/sed/code->
Feedback
I think that the descriptions of some of the commands leaves out essential
details.
For example:
Is it legal to follow label with a space. ( yes)
Should r and w be followed by a space ( I always put one)
Should w be the last flag to s ( yes)
I don't like the command overview. I would prefer the full description of
each command in one place.
Best Wishes
David L Ward
Reply
Forward
[Message part 2 (text/html, inline)]
This bug report was last modified 6 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.