Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!cbmvax!grr From: grr@cbmvax.UUCP (George Robbins) Newsgroups: comp.unix.ultrix Subject: Re: Ultrix 3.0 changed basename(1) Message-ID: <7776@cbmvax.UUCP> Date: 29 Aug 89 17:36:39 GMT References: <1989Aug25.144051.11467@acd4.UUCP> <3074@solo4.cs.vu.nl> <7769@cbmvax.UUCP> <1989Aug29.132003.23389@acd4.UUCP> Reply-To: grr@cbmvax.UUCP (George Robbins) Organization: Commodore Technology, West Chester, PA Lines: 32 In article <1989Aug29.132003.23389@acd4.UUCP> mjb@acd4.UUCP ( Mike Bryan ) writes: > In article <7769@cbmvax.UUCP> grr@cbmvax.UUCP (George Robbins) writes: > >> mjb@acd4.UUCP ( Mike Bryan ) writes: > >> \It seems basename() now does some limited regular expression handling. > >> \Therefore, the command "basename /vmunix .x" will produce "vmun", > >> \rather than the expected "vmunix". [...] > >> > >Perhaps you haven't looked closely at the manual page entry for the System V > >implementation of basename - for better or worse, the second argument is > >interpreted as part of a expr(1) regular expression, with just the behavior > >described above. > > Well, maybe the manual page entry says that, but looking at Issue 2 of > the SVID, Volume 2, page 31, it says: > > "The command basename deletes any prefix ending in / and the suffix > (if present in string), and prints the result on the standard output." > > Period. Nothing about REs at all. Well, actually I noticed that also, but preferred reality to the SVID. It may be that the SVID page is screwed up, the expample shown has the '.x' quoted, which would only be neccessary if there's a backslash preceeding the '.' as in the man page example...wouldn't be the first time someone screwed up troff text and made \'s dissapear. Perhaps there's a test in the SVVS that fails without the regular expression stuff. Certainly the SVr3 system I tried it on did the silly RE stuff... -- George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr but no way officially representing arpa: cbmvax!grr@uunet.uu.net Commodore, Engineering Department fone: 215-431-9255 (only by moonlite)