From 30f76e827e230970cba8fbd81ba4a06c14c3add6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 29 Apr 1996 01:35:18 +0000 Subject: [PATCH] (main): Give a better diagnostic for `sort -0'. Reported by Karl Berry. --- src/sort.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sort.c b/src/sort.c index 1bd315f6cf..224e7d34b4 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; -- 2.47.3