diff options
author | Jim Meyering <jim@meyering.net> | 2002-07-29 08:40:10 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-07-29 08:40:10 +0000 |
commit | c8729cad9897ebb46ac2407793eda67316792f66 (patch) | |
tree | a1fc5677346ccd1d7488d0dfc546c9ccc41a020b /src | |
parent | 14714daf41f8474f4d37087f1a1fa8778d17c438 (diff) | |
download | coreutils-c8729cad9897ebb46ac2407793eda67316792f66.tar.xz |
Adjust command examples in comments to use POSIX 1003.1-2001 option syntax.
From Paul Eggert.
Diffstat (limited to 'src')
-rw-r--r-- | src/sort.c | 13 | ||||
-rw-r--r-- | src/tail.c | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/sort.c b/src/sort.c index 9d1b8ac35..5b75ebe45 100644 --- a/src/sort.c +++ b/src/sort.c @@ -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. */ diff --git a/src/tail.c b/src/tail.c index 3ab262d03..c6203b1b9 100644 --- a/src/tail.c +++ b/src/tail.c @@ -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) |