home *** CD-ROM | disk | FTP | other *** search
- 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
- From: gwc@root.co.uk (Geoff Clare)
- Newsgroups: comp.unix.shell
- Subject: Re: Action of `echo */'
- Message-ID: <By110F.1s8@root.co.uk>
- Date: 20 Nov 92 18:07:25 GMT
- References: <1eg04jINN9go@sprocket.csv.warwick.ac.uk> <1992Nov19.163705.15795@eua.ericsson.se>
- Organization: UniSoft Ltd., London, England
- Lines: 42
-
- per@erix.ericsson.se (Per Hedeland) writes:
-
- >In article <1eg04jINN9go@sprocket.csv.warwick.ac.uk>, cudcv@csv.warwick.ac.uk (Rob McMahon) writes:
- >|> SunOS 4.1.3, tcsh 6.02.00, bash 1.12.1.
- >...
- >|> Aagh! Say what ? I'm sure this used to work, in sh, csh, and tcsh.
- >|> Somewhere along the line it's all gone horribly wrong.
-
- >It's a bug, er... fix introduced in SunOS 4.1.3. It's in the release
- >manual, section 6.6 "POSIX Bugs Fixed", "Kernel":
-
- >1039505 Trailing / in pathname should be ignored.
-
- This is a kernel bug fix, presumably relating to treatment of pathnames
- passed as arguments to system calls. It has nothing to do with the shell.
-
- >I have no idea what POSIX says on the issue, but wouldn't treating
- >'directory/' as equivalent to 'directory' (rather than 'directory/.',
- >which is the pre-4.1.3 behaviour), while treating 'file/' as
- >nonexistent, make everybody happy?
-
- I don't think POSIX.2 is clear about what `echo */` should expand to. I
- don't have a copy of POSIX.2, but I do have one of XPG4 which is a
- superset of POSIX.2. All I can find on this subject is the following:
-
- From XCU4 section 2.13.2:
-
- The asterisk (*) is a pattern that will match any string,
- including the null string.
-
- From XCU4 section 2.13.3:
-
- The slash character in a pathname must be explicitly matched by
- using one or more slashes in the pattern; it cannot be matched by
- the asterisk or question-mark special characters or by a bracket
- expression.
-
- It might be interesting to submit this issue to the IEEE for an official
- POSIX.2 interpretation. Any volunteers?
- --
- Geoff Clare <gwc@root.co.uk> (USA antiquated mailers: ...!uunet!root.co.uk!gwc)
- UniSoft Limited, London, England. Tel: +44 71 729 3773 Fax: +44 71 729 3273
-