The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Ralph Corderoy <ralph@inputplus.co.uk>
To: TUHS main list <tuhs@tuhs.org>
Subject: [TUHS] The 'usage: ...' message.  (Was: On Bloat...)
Date: Sun, 19 May 2024 09:58:15 +0100	[thread overview]
Message-ID: <20240519085815.5B37A20146@orac.inputplus.co.uk> (raw)
In-Reply-To: <20240518182218.44ED921309@orac.inputplus.co.uk>

Hi,

I wrote:
> Another point against adding --help: there's a second attempt to
> describe the source.

It occurred to me --help's the third attempt as there's already ‘usage:
argv[0] ...’.  Back when running man took time and paper, I can see
a one-line summary to aid memory was useful.  I wondered when it first
appeared.

I've found V2, https://www.tuhs.org/cgi-bin/utree.pl?file=V2/cmd, has
cmp.s with

    cmp     (sp)+,$3
    beq     1f
    jsr     r5,mesg; <Usage: cmp arg1 arg2\n\0>; .even
    sys     exit

And cp.c has

    if(argc != 3) {
	    write(1,"Usage: cp oldfile newfile\n",26);
	    exit();
    }

Given the lack of options, the need for a usage message surprises me.
But then ‘cp a-src a-dest b-src b-dest ...’ used to copy files in pairs.
Perhaps when this was dropped, one too many losses?, the usage was
needed to remind users of the change.

Any earlier Unix examples known by the list?
And was ‘usage: ...’ adopted from an earlier system?

-- 
Cheers, Ralph.

  reply	other threads:[~2024-05-19  8:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-18 18:07 [TUHS] Re: On Bloat and the Idea of Small Specialized Tools Douglas McIlroy
2024-05-18 18:13 ` Brantley Coile
2024-05-18 18:18 ` Larry McVoy
2024-05-18 18:52   ` Clem Cole
2024-05-18 19:19     ` Luther Johnson
2024-05-18 20:12       ` segaloco via TUHS
2024-05-18 19:32     ` Stuff Received
2024-05-18 18:22 ` Ralph Corderoy
2024-05-19  8:58   ` Ralph Corderoy [this message]
2024-05-18 18:31 ` Peter Weinberger (温博格) via TUHS
2024-05-18 20:33 ` Steffen Nurpmeso
2024-05-19  8:39   ` Marc Rochkind
2024-05-20  6:07     ` Adam Thornton
2024-05-20 15:43       ` [TUHS] Documentation (was On Bloat and the Idea of Small Specialized Tools) Paul Winalski
2024-05-20 16:37         ` [TUHS] " Andrew Hume
2024-05-20 18:38         ` Yeechang Lee
2024-05-20 19:27           ` Phil Budne
2024-05-19 14:03 [TUHS] The 'usage: ...' message. (Was: On Bloat...) Douglas McIlroy
2024-05-19 23:08 Douglas McIlroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240519085815.5B37A20146@orac.inputplus.co.uk \
    --to=ralph@inputplus.co.uk \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).