[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] doc: rework BRE/ERE table to fit PDF manual
From: |
Alexandre Jasmin |
Subject: |
[PATCH 2/4] doc: rework BRE/ERE table to fit PDF manual |
Date: |
Fri, 3 Feb 2017 19:36:28 -0500 |
Sample code in the basic/extended table was too wide to fit on a Letter
size printout. Text was overlapping and unreadable. Remove margin,
split commands in two lines and change the column with.
* doc/sed.texi (Basic and extended regexp): rework table
---
doc/sed.texi | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/doc/sed.texi b/doc/sed.texi
index 8afe881..d44ceb3 100644
--- a/doc/sed.texi
+++ b/doc/sed.texi
@@ -2460,7 +2460,7 @@ unless prefixed backslash (@samp{\}); While with extended
(ERE) syntax
it is reversed: these characters are special unless they are prefixed
with backslash (@samp{\}).
address@hidden @columnfractions .33 .33 .33
address@hidden @columnfractions .28 .36 .35
@headitem Desired pattern
@tab Basic (BRE) Syntax
@@ -2469,30 +2469,37 @@ with backslash (@samp{\}).
@item literal @samp{+} (plus sign)
@tab
address@hidden 0
@example
-$ echo "a+b=c" | sed -n '/a+b/p'
+$ echo "a+b=c" > foo
+$ sed -n '/a+b/p' < foo
a+b=c
@end example
@tab
address@hidden 0
@example
-$ echo "a+b=c" | sed -E -n '/a\+b/p'
+$ echo "a+b=c" > foo
+$ sed -E -n '/a\+b/p' < foo
a+b=c
@end example
-
@item One or more @samp{a} characters followed by @samp{b}
(plus sign as special meta-character)
@tab
address@hidden 0
@example
-$ echo "aab" | sed -n '/a\+b/p'
+$ echo "aab" > foo
+$ sed -n '/a\+b/p' < foo
aab
@end example
@tab
address@hidden 0
@example
-$ echo "aab" | sed -E -n '/a+b/p'
+$ echo "aab" > foo
+$ sed -E -n '/a+b/p' < foo
aab
@end example
--
2.11.0.258.ge05806da9