]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Adjust command examples in comments to use POSIX 1003.1-2001 option syntax.
authorJim Meyering <jim@meyering.net>
Mon, 29 Jul 2002 08:40:10 +0000 (08:40 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 29 Jul 2002 08:40:10 +0000 (08:40 +0000)
From Paul Eggert.

src/sort.c
src/tail.c

index 9d1b8ac35b274a086c64917d9a4becaf785c6734..5b75ebe45a925d18e72674a992511b3ad966dcd2 100644 (file)
@@ -852,24 +852,25 @@ limfield (const struct line *line, const struct keyfield *key)
 
      From: kwzh@gnu.ai.mit.edu (Karl Heuer)
      Date: Thu, 30 May 96 12:20:41 -0400
+     [Translated to POSIX 1003.1-2001 terminology by Paul Eggert.]
 
      [...]I believe I've found another bug in `sort'.
 
      $ cat /tmp/sort.in
      a b c 2 d
      pq rs 1 t
-     $ textutils-1.15/src/sort +0.6 -0.7 </tmp/sort.in
+     $ textutils-1.15/src/sort -k1.7,1.7 </tmp/sort.in
      a b c 2 d
      pq rs 1 t
-     $ /bin/sort +0.6 -0.7 </tmp/sort.in
+     $ /bin/sort -k1.7,1.7 </tmp/sort.in
      pq rs 1 t
      a b c 2 d
 
      Unix sort produced the answer I expected: sort on the single character
-     in column 6.  GNU sort produced different results, because it disagrees
-     on the interpretation of the key-end spec "-M.N".  Unix sort reads this
-     as "skip M fields, then N characters"; but GNU sort wants it to mean
-     "skip M fields, then either N characters or the rest of the current
+     in column 7.  GNU sort produced different results, because it disagrees
+     on the interpretation of the key-end spec "M.N".  Unix sort reads this
+     as "skip M-1 fields, then N-1 characters"; but GNU sort wants it to mean
+     "skip M-1 fields, then either N-1 characters or the rest of the current
      field, whichever comes first".  This extra clause applies only to
      key-ends, not key-starts.
      */
index 3ab262d0318f556795aad69cc28111b33fff2d6a..c6203b1b975b92a6bf39e82e02a5671ede272df7 100644 (file)
@@ -1615,8 +1615,8 @@ main (int argc, char **argv)
   }
 
   /* To start printing with item N_UNITS from the start of the file, skip
-     N_UNITS - 1 items.  `tail +0' is actually meaningless, but for Unix
-     compatibility it's treated the same as `tail +1'.  */
+     N_UNITS - 1 items.  `tail -n +0' is actually meaningless, but for Unix
+     compatibility it's treated the same as `tail -n +1'.  */
   if (from_start)
     {
       if (n_units)