home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v1 / text0015.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  1.1 KB

  1. From: John Chambers (guest moderator) <ut-sally!std-unix>
  2.  
  3. Topic: getopts (command line arguments) continued
  4.  
  5. ----------------------------------------------------------------------
  6.  
  7. Date: Mon, 8 Jul 85 14:41:54 PDT
  8. From: UCLA Computer Club <cc1@UCLA-LOCUS.ARPA>
  9. Subject: Re: command line arguments
  10.  
  11. Regarding getopts and the 'all arguments are proceded by a "-"':
  12. What about arguments that can be on/off switches, or can be positive or
  13. negative numbers? In other words, what is wrong with allowing '+' as an
  14. indicator of arguments? There are some commands that use it already.
  15.  
  16. Incidently, what happens with getopts if the command line was
  17. command -n -30
  18. and:
  19. Option n is fetched
  20. option 3 is fetched
  21. option 0 is fetched
  22.  
  23. (No well written program would do all this, but essentially, what happens
  24. if an argument looks like a flag? Or have you never grep'ed for a string
  25. beginning with -?)
  26.  
  27. ----------------------------------------------------------------------
  28.  
  29. -- 
  30.  
  31. John B. Chambers, Microelectronics and Computer Technology Corp., Austin, TX
  32. {ihnp4,seismo,ctvax}!ut-sally!mcc-db!jbc, jbc@ut-sally.ARPA, chambers@mcc.ARPA
  33.  
  34. Volume-Number: Volume 1, Number 16
  35.  
  36.