Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uiucdcsm!bradley From: bradley@uiucdcsm.cs.uiuc.edu Newsgroups: comp.lang.c++ Subject: Re: C++ on Sun3 Message-ID: <4800017@uiucdcsm> Date: 5 Feb 88 17:50:00 GMT References: <382@idacrd.UUCP> Lines: 28 Nf-ID: #R:idacrd.UUCP:382:uiucdcsm:4800017:000:823 Nf-From: uiucdcsm.cs.uiuc.edu!bradley Feb 5 11:50:00 1988 /* Written 7:52 am Feb 4, 1988 by dld@idacrd.UUCP in uiucdcsm:comp.lang.c++ */ You probably need a smarter version of basename. The sysV basename is such that: if x = ` basename u.c .[cC]` then $x = u. The shell script CC uses this fact to take care of the names of things. /* End of text from uiucdcsm:comp.lang.c++ */ You don't need to mess with basename! (Of course if you really want to...) Instead you can split the above line into two lines, like this: A = `basename $B .c` B = `basename $B .C` Now that I think about it, this will fail if you have a file name like myfile.C.c, but such cases are rare. Anyway, this is the change we made on our Sun 3 and it has worked fine for us so far. David Bradley bradley@a.cs.uiuc.edu Department of Computer Science University of Illinois at Urbana-Champaign