From 45fa7d33a75a267de4ad6e1ff2afc32cff0978a0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 28 Dec 2016 09:44:28 +0100 Subject: [PATCH] . --- doc/sed.texi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/sed.texi b/doc/sed.texi index 8caae0c..a3093d6 100644 --- a/doc/sed.texi +++ b/doc/sed.texi @@ -3049,7 +3049,7 @@ newline before it. newline before it. @item N address@hidden line from the input file the pattern space. address@hidden line from the input file to the pattern space. @item P @emph{prints} line from the pattern space until the first newline. @@ -3084,14 +3084,14 @@ At the beginning of every cycle, the @code{N} commands appends a newline and the next line to the pattern space (i.e. @samp{1}, @samp{\n}, @samp{2} in the first cycle). @item -The @code{l} command to print the content of the pattern space -unabigiously. +The @code{l} command prints the content of the pattern space +unambiguously. @item The @code{D} command then removes the content of pattern space up to the first newline (leaving @samp{2} at the end of the first cycle). @item -At the next cycle the @code{N} commamnd appends a +At the next cycle the @code{N} command appends a newline and the next input line to the pattern space (e.g. @samp{2}, @samp{\n}, @samp{3}). @end enumerate @@ -3118,7 +3118,7 @@ On all lines except the last, the pattern space is deleted and the cycle is restarted. @item -The other expressions @code{x} and @code{s} are exected only on empty +The other expressions @code{x} and @code{s} are executed only on empty lines (i.e. paragraph separators). The @code{x} command fetches the accumulated lines from the hold space back to the pattern space. The @code{s///} command then operates on all the text in the paragraph @@ -3167,7 +3167,7 @@ cc cc cc cc @codequoteundirected off @codequotebacktick off -For more annotated examples, @pxref{Text search across mutliple lines} +For more annotated examples, @pxref{Text search across multiple lines} and @ref{Line length adjustment}. @@ -3193,7 +3193,7 @@ Some exotic examples: * Rename files to lower case:: * Print bash environment:: * Reverse chars of lines:: -* Text search across mutliple lines:: +* Text search across multiple lines:: * Line length adjustment:: Emulating standard utilities: @@ -3284,7 +3284,7 @@ technique. @end group @group -# del leading and trailing spaces +# delete leading and trailing spaces y/@kbd{tab}/ / s/^ *// s/ *$// @@ -3627,8 +3627,8 @@ s/\n//g @c end--------------------------------------------- address@hidden Text search across mutliple lines address@hidden Text search across mutliple lines address@hidden Text search across multiple lines address@hidden Text search across multiple lines This section uses @code{N} and @code{D} commands to search for consecutive words spanning multiple lines. @xref{Multiline techniques}. @@ -3669,7 +3669,7 @@ it was the@ the age of wisdom, @itemize @bullet @item -The regular expression @samp{\b\w+\b} searchs for word-boundary (@samp{\b}), +The regular expression @samp{\b\w+\b} searches for word-boundary (@samp{\b}), followed by one-or-more word-characters (@samp{\w+}), followed by another word-boundary. @xref{regexp extensions}. @@ -3798,7 +3798,7 @@ a new cycle. @item The @samp{N} command reads the next line from the input file, and appends -it to the existing content of the pattern space (with a newline preceeding it). +it to the existing content of the pattern space (with a newline preceding it). @item The first @samp{s/\n/ /g} command replaces all newlines with spaces, discarding -- 2.8.0-rc2