Article View: mod.std.unix
Article #104What to do about extraneous arguments?
From: John B. Chambers
Date: Sun, 14 Jul 1985 23:56
Date: Sun, 14 Jul 1985 23:56
36 lines
1829 bytes
1829 bytes
From: John Chambers (guest moderator) <ut-sally!std-unix>
Topic: command line arguments continued
----------------------------------------------------------------------
From: ihnp4!tektronix!uucp@ut-sally.ARPA
Date: Saturday, 13 Jul 85 18:43:47 PDT
Subject: What to do about extraneous arguments?
Another aspect of command arguments is: after all the necessary arguments
have been processed, what if some are left?
Some commands process the whole list, and are intended to do so (e.g.
ls(1)). Others (e.g. diff(1), cmp(1)) only work on a specific number
of arguments.
Common practice seems to be to ignore extraneous arguments. A user here
has requested that cmp(1) be modified to generate a diagnostic if more
than 2 filenames are provided. This might be helpful when using wildcards
for filenames, as in:
cmp foo* fum*
If there is more than one file matching 'foo*' and you don't realize it,
the results are not what you expect. Comments?
tektronix!rdoty
----------------------------------------------------------------------
--
John B. Chambers, Microelectronics and Computer Technology Corp., Austin, TX
{ihnp4,seismo,ctvax}!ut-sally!mcc-db!jbc, jbc@ut-sally.ARPA, chambers@mcc.ARPA
Technical Details
Message-ID:
<251@mcc-db.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!decvax!genrad!panda!talcott!harvard!seismo!ut-sally!mcc-db!jbcShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site mcc-db.UUCP Path: arc1-ca.pugleaf.net!utzoo!decvax!genrad!panda!talcott!harvard!seismo!ut-sally!mcc-db!jbc From: jbc@mcc-db.UUCP (John B. Chambers) Newsgroups: mod.std.unix Subject: What to do about extraneous arguments? Message-ID: <251@mcc-db.UUCP> Date: Sun, 14-Jul-85 19:56:42 EDT Article-I.D.: mcc-db.251 Posted: Sun Jul 14 19:56:42 1985 Date-Received: Mon, 15-Jul-85 10:07:20 EDT Reply-To: std-unix-request@ut-sally Organization: MCC (Austin, TX) Lines: 38 Approved: jbc@mcc-db.UUCP