]> git.ipfire.org Git - thirdparty/coreutils.git/commit
doc: clarify tail -n/-c +NUM operation
authorPádraig Brady <P@draigBrady.com>
Thu, 20 Jul 2023 13:50:56 +0000 (14:50 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 20 Jul 2023 14:13:01 +0000 (15:13 +0100)
commitb0e41e3f3016700c86f2e9b9c2ab9a49e9774a21
tree4ef3c48c0c023f80a10b68f71f639277a7b545a3
parent4bf182f92ae249560f61bccea3598ec87b0cf8c1
doc: clarify tail -n/-c +NUM operation

tail -n/-c +NUM, is different from tail -n/-c NUM,
and head -n/-c NUM, and head -n/c -NUM, in that it
specifies a 1 based index rather than a count to skip/include.
So clarify this in tail --help and tail info manual.
Note we also mention this gotcha at:
https://www.pixelbeat.org/docs/coreutils-gotchas.html#tail

* doc/coreutils.texi (tail invocation): Give examples for -c/-n +NUM,
to make it clear one has to specify a number 1 larger than
might be expected.
* src/tail.c (usage): State the skip at start edge case more clearly
in the -n description. -c is not often used with tail so we leave
full explanation of that to the info manual.  Also split the string
to simplify translation.
doc/coreutils.texi
src/tail.c