]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: csplit: clarify [OFFSET] syntax
authorPádraig Brady <P@draigBrady.com>
Thu, 27 Jan 2022 13:05:39 +0000 (13:05 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 27 Jan 2022 13:07:28 +0000 (13:07 +0000)
* src/csplit.c (usage): Clarify that '+' prefix is optional on OFFSET.
* doc/coreutils.texi (csplit invocation): Likewise.
Fixes https://bugs.gnu.org/53574

doc/coreutils.texi
src/csplit.c

index af87d4e6a99a462b74c3169880846d8fab06b106..c174065503f6e43ccc238f81a4dd18b84d3817c0 100644 (file)
@@ -3554,7 +3554,8 @@ file once for each repeat.
 @item /@var{regexp}/[@var{offset}]
 Create an output file containing the current line up to (but not
 including) the next line of the input file that contains a match for
-@var{regexp}.  The optional @var{offset} is an integer.
+@var{regexp}.  The optional @var{offset} is an integer, that can
+be preceded by @samp{+} or @samp{-}.
 If it is given, the input up to (but not including) the
 matching line plus or minus @var{offset} is put into the output file,
 and the line after that begins the next section of input.
index d07b74d69e830d0f64421478ccec94439c69bf86..e6a9de9bf45589bd2928417fdd59cac62467d654 100644 (file)
@@ -1515,7 +1515,7 @@ Each PATTERN may be:\n\
   {INTEGER}          repeat the previous pattern specified number of times\n\
   {*}                repeat the previous pattern as many times as possible\n\
 \n\
-A line OFFSET is a required '+' or '-' followed by a positive integer.\n\
+A line OFFSET is an integer optionally preceded by '+' or '-'\n\
 "), stdout);
       emit_ancillary_info (PROGRAM_NAME);
     }