summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-04-29 01:35:18 +0000
committerJim Meyering <jim@meyering.net>1996-04-29 01:35:18 +0000
commit30f76e827e230970cba8fbd81ba4a06c14c3add6 (patch)
tree411b8d099d70682ab620627fd24a969d2ccdaef5
parent8b9e784e1e1f9bf53fd831dba6677299857a31e4 (diff)
downloadcoreutils-30f76e827e230970cba8fbd81ba4a06c14c3add6.tar.xz
(main): Give a better diagnostic for `sort -0'. Reported by Karl Berry.
-rw-r--r--src/sort.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sort.c b/src/sort.c
index 1bd315f6c..224e7d34b 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -1773,7 +1773,12 @@ main (int argc, char **argv)
if (digits[UCHAR (*s)] || (*s == '.' && digits[UCHAR (s[1])]))
{
if (!key)
- usage (SORT_FAILURE);
+ {
+ /* Provoke with `sort -9'. */
+ error (0, 0, _("when using the old-style +POS and -POS \
+key specifiers,\nthe +POS specifier must come first"));
+ usage (SORT_FAILURE);
+ }
for (t = 0; digits[UCHAR (*s)]; ++s)
t = t * 10 + *s - '0';
t2 = 0;