command line arguments

John B. Chambers jbc at mcc-db.UUCP
Mon Jul 15 09:56:26 AEST 1985


From: John Chambers (guest moderator) <ut-sally!std-unix>

Topic: command line arguments continued

----------------------------------------------------------------------

Date: 8 Jul 85 23:23:03 CDT (Mon)
From: ihnp4!utzoo!henry at ut-sally.ARPA
Subject: Re: command line arguments

> I doubt the necessity and even the wisdom of seperating an argument from
> the option by whitespace.

As I recall it, the AT&T standard does it this way on the grounds of
readability, not necessity.  The "-t/dev/tty" example is an easy one
to pick out, but what about "-dfaglop"?  Which of those letters are
options, and which are an option argument?

> I also dislike the blackballing of multicharacter options.

Unfortunately, they are seriously incompatible with one-character options
and option bundling, both of which are too firmly entrenched to be changed
at this late date.  There were earlier attempts within AT&T to change
the world by legislating a different way of doing things; you don't hear
about them because they were failures.  People ignored them.  Getopt and
the option standard have the virtue of being pretty much compatible with
the bulk of present practice, which makes it far more likely that they
will be *adopted*.

> As for multicharater options: do you intend to kill "tail -30"? Since
> changing the number of lines is the most common case what's the problem?
> At any rate you should allow a simple '-nnn' for a high-usage.

The AT&T people admit that existing high-usage programs cannot be changed
retroactively.  This is a blemish rather than a disaster.  I tend to agree
that "-nnn" would be nice to have, but am not excited enough about it to
fight a battle over it.

				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



----------------------------------------------------------------------

-- 

John B. Chambers, Microelectronics and Computer Technology Corp., Austin, TX
{ihnp4,seismo,ctvax}!ut-sally!mcc-db!jbc, jbc at ut-sally.ARPA, chambers at mcc.ARPA



More information about the Mod.std.unix mailing list