command line arguments
John B. Chambers
jbc at mcc-db.UUCP
Mon Jul 15 09:56:19 AEST 1985
From: John Chambers (guest moderator) <ut-sally!std-unix>
Topic: getopts (command line arguments) continued
----------------------------------------------------------------------
Date: Mon, 8 Jul 85 14:41:54 PDT
From: UCLA Computer Club <cc1 at UCLA-LOCUS.ARPA>
Subject: Re: command line arguments
Regarding getopts and the 'all arguments are proceded by a "-"':
What about arguments that can be on/off switches, or can be positive or
negative numbers? In other words, what is wrong with allowing '+' as an
indicator of arguments? There are some commands that use it already.
Incidently, what happens with getopts if the command line was
command -n -30
and:
Option n is fetched
option 3 is fetched
option 0 is fetched
(No well written program would do all this, but essentially, what happens
if an argument looks like a flag? Or have you never grep'ed for a string
beginning with -?)
----------------------------------------------------------------------
--
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