basename(1) surprise
Jan-Simon Pendry
jsp at icdoc.UUCP
Fri Aug 23 01:07:25 AEST 1985
In article <1217 at hcrvx1.UUCP> hugh at hcrvx1.UUCP (Hugh Redelmeier) writes:
>Under System V the "suffix" operand of basename is a regular expression
> ... if the programmer fails to
>quote the dot twice (once for the shell, and once for basename's
>pattern matcher) it will match any character. Thus
> basename cccc .c
>yields
> cc
Not on my System V machines! The example above prints "cccc".
Of course - it could be the particular implementation but I see no
need for a manufacturer to alter a shell script. [The software
is based on SysVr2 for Vax.]
--
Jan-Simon Pendry
icdoc!jsp
More information about the Net.bugs.usg
mailing list