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

  1. From: John Chambers (guest moderator) <ut-sally!std-unix>
  2.  
  3. Topic: command line arguments continued
  4.  
  5. ----------------------------------------------------------------------
  6.  
  7. From: ihnp4!tektronix!uucp@ut-sally.ARPA
  8. Date: Saturday, 13 Jul 85 18:43:47 PDT
  9. Subject: What to do about extraneous arguments?
  10.  
  11. Another aspect of command arguments is: after all the necessary arguments
  12. have been processed, what if some are left?
  13.  
  14. Some commands process the whole list, and are intended to do so (e.g.
  15. ls(1)).  Others (e.g. diff(1), cmp(1)) only work on a specific number
  16. of arguments.
  17.  
  18. Common practice seems to be to ignore extraneous arguments.  A user here
  19. has requested that cmp(1) be modified to generate a diagnostic if more
  20. than 2 filenames are provided.  This might be helpful when using wildcards
  21. for filenames, as in:
  22.  
  23.     cmp foo* fum*
  24.  
  25. If there is more than one file matching 'foo*' and you don't realize it,
  26. the results are not what you expect.  Comments?
  27.  
  28. tektronix!rdoty
  29.  
  30.  
  31. ----------------------------------------------------------------------
  32.  
  33. -- 
  34.  
  35. John B. Chambers, Microelectronics and Computer Technology Corp., Austin, TX
  36. {ihnp4,seismo,ctvax}!ut-sally!mcc-db!jbc, jbc@ut-sally.ARPA, chambers@mcc.ARPA
  37.  
  38. Volume-Number: Volume 1, Number 18
  39.  
  40.