home *** CD-ROM | disk | FTP | other *** search
- 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@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@ut-sally.ARPA, chambers@mcc.ARPA
-
- Volume-Number: Volume 1, Number 16
-
-