coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] doc: Improve NUM documentation for head and tail


From: Pádraig Brady
Subject: Re: [PATCH] doc: Improve NUM documentation for head and tail
Date: Thu, 20 Jul 2023 15:05:28 +0100
User-agent: Mozilla Thunderbird

On 19/07/2023 19:21, Dragan Simic wrote:
Clarify that the NUM values for head and tail are indices, and briefly
describe the specifics of +NUM for tail.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---
  src/head.c | 3 ++-
  src/tail.c | 4 +++-
  2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/head.c b/src/head.c
index 7bba1420c..e82f9e195 100644
--- a/src/head.c
+++ b/src/head.c
@@ -137,7 +137,8 @@ With more than one FILE, precede each with a header giving 
the file name.\n\
        fputs (VERSION_OPTION_DESCRIPTION, stdout);
        fputs (_("\
  \n\
-NUM may have a multiplier suffix:\n\
+NUM values are indices, thus counting lines and bytes in a file starts\n\
+from one.  NUM may also have a multiplier suffix:\n\
  b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\
  GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y, R, Q.\n\
  Binary prefixes can be used, too: KiB=K, MiB=M, and so on.\n\


Well only tail -n+NUM is an index,
whereas the other combinations would be most generally considered
as a count (to skip or include).
Also this doesn't specify if the index is 0 or 1 based.

I'll apply the attached instead, which I think clarifies things.

thanks,
Pádraig

Attachment: tail-n+-clarification.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]