Ultrix 3.0 changed basename(1)

George Robbins grr at cbmvax.UUCP
Wed Aug 30 03:36:39 AEST 1989


In article <1989Aug29.132003.23389 at acd4.UUCP> mjb at acd4.UUCP ( Mike Bryan          ) writes:
> In article <7769 at cbmvax.UUCP> grr at cbmvax.UUCP (George Robbins) writes:
> >> mjb at 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 at uunet.uu.net
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)



More information about the Comp.unix.ultrix mailing list