Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!petsd!peora!ucf-cs!novavax!houligan!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA Newsgroups: net.bugs.usg Subject: Re: basename(1) surprise Message-ID: <1050@brl-tgr.ARPA> Date: Wed, 28-Aug-85 09:14:54 EDT Article-I.D.: brl-tgr.1050 Posted: Wed Aug 28 09:14:54 1985 Date-Received: Wed, 4-Sep-85 06:40:47 EDT References: <1217@hcrvx1.UUCP> <239@ivax.icdoc.UUCP> Organization: Ballistic Research Lab Lines: 15 > In article <1217@hcrvx1.UUCP> hugh@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.] Funny; "basename" version 1.4 (SVR2 VAX) has the problem Hugh reported.