From 4a0a8fdbec1f522f529801082e918c47e70166c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Thu, 27 Jan 2022 13:05:39 +0000 Subject: [PATCH] doc: csplit: clarify [OFFSET] syntax * 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 | 3 ++- src/csplit.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index af87d4e6a9..c174065503 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -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. diff --git a/src/csplit.c b/src/csplit.c index d07b74d69e..e6a9de9bf4 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -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); } -- 2.47.2