more fun ultrix 3.0 bugs: basename
George Robbins
grr at cbmvax.UUCP
Wed Jul 12 14:32:45 AEST 1989
When trying to determine why a few old reliable shell scripts had
started acting screwey with Ultrix 3.0, I pinned it down to the
problems with the 'basename' utility.
With Ultrix 3.0, a command of the form:
basename "foo/*"
yields a "syntax error" message instead of the correct output: *
Ultrix 2.2 gave the correct result, as does System Vr3 basename.
The problem seems to be inadequate quoting in the bourne shell
script that replaced the basename executable present in Ultrix 2.2.
The new "dirname" that appeared in Ultrix 3.0 is also messed up
although it seems to give the correct result. A command like:
dirname "*/foo"
ends up globbing the current directory makeing it run rather
slowly, even if it does get the answer correct.
Workaround:
Replace the 3.0 version of basename with an older, function version.
Alternative:
Throw a bunch of quotes at basename and dirname.
--
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