home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / shell / 4820 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  2.2 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!sdd.hp.com!swrinde!elroy.jpl.nasa.gov!ames!agate!doc.ic.ac.uk!uknet!root44!gwc
  2. From: gwc@root.co.uk (Geoff Clare)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: Action of `echo */'
  5. Message-ID: <By110F.1s8@root.co.uk>
  6. Date: 20 Nov 92 18:07:25 GMT
  7. References: <1eg04jINN9go@sprocket.csv.warwick.ac.uk> <1992Nov19.163705.15795@eua.ericsson.se>
  8. Organization: UniSoft Ltd., London, England
  9. Lines: 42
  10.  
  11. per@erix.ericsson.se (Per Hedeland) writes:
  12.  
  13. >In article <1eg04jINN9go@sprocket.csv.warwick.ac.uk>, cudcv@csv.warwick.ac.uk (Rob McMahon) writes:
  14. >|> SunOS 4.1.3, tcsh 6.02.00, bash 1.12.1.
  15. >...
  16. >|> Aagh!  Say what ?  I'm sure this used to work, in sh, csh, and tcsh.
  17. >|> Somewhere along the line it's all gone horribly wrong.
  18.  
  19. >It's a bug, er... fix introduced in SunOS 4.1.3. It's in the release
  20. >manual, section 6.6 "POSIX Bugs Fixed", "Kernel":
  21.  
  22. >1039505 Trailing / in pathname should be ignored.
  23.  
  24. This is a kernel bug fix, presumably relating to treatment of pathnames
  25. passed as arguments to system calls.  It has nothing to do with the shell.
  26.  
  27. >I have no idea what POSIX says on the issue, but wouldn't treating
  28. >'directory/' as equivalent to 'directory' (rather than 'directory/.',
  29. >which is the pre-4.1.3 behaviour), while treating 'file/' as
  30. >nonexistent, make everybody happy?
  31.  
  32. I don't think POSIX.2 is clear about what `echo */` should expand to.  I
  33. don't have a copy of POSIX.2, but I do have one of XPG4 which is a
  34. superset of POSIX.2.  All I can find on this subject is the following:
  35.  
  36.     From XCU4 section 2.13.2:
  37.  
  38.     The asterisk (*) is a pattern that will match any string,
  39.     including the null string.
  40.  
  41.     From XCU4 section 2.13.3:
  42.  
  43.     The slash character in a pathname must be explicitly matched by
  44.     using one or more slashes in the pattern; it cannot be matched by
  45.     the asterisk or question-mark special characters or by a bracket
  46.     expression.
  47.  
  48. It might be interesting to submit this issue to the IEEE for an official
  49. POSIX.2 interpretation.  Any volunteers?
  50. -- 
  51. Geoff Clare <gwc@root.co.uk> (USA antiquated mailers: ...!uunet!root.co.uk!gwc)
  52. UniSoft Limited, London, England.   Tel: +44 71 729 3773   Fax: +44 71 729 3273
  53.