Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!rochester!uhura.cc.rochester.edu!ur-valhalla!micropen!steve From: steve@micropen (Steven J. Owens) Newsgroups: comp.unix.questions Subject: Re: ????? HELP!!! what is wrong with this code? ??????? Summary: What about the directory you're in ? Message-ID: <561@micropen> Date: 12 Oct 88 21:12:49 GMT References: <456@mrsvr.UUCP> <8271@alice.UUCP> Organization: Micropen Dirent Writing Systems, Pittsford, NY Lines: 30 In article <8271@alice.UUCP>, debra@alice.UUCP (Paul De Bra) writes: > > Your code is just fine. The problem is that you named your program "test". > There is a standard utility "test" in /bin, and if that comes before your > current directory in your $PATH, you actually execute /bin/test instead > of your own program. When you run "dbx test" or something, you give "test" > as argument, and that is not subject to PATH-search, so dbx will run your > "test" instead of /bin/test. That's all. > > Paul. I always thought UNIX checked in the directory you are in first for the binary, then if it couldn't find it there, it checked the $PATH. And no, the code is not 'just fine', there are problems with it. Although people do it, there is really no reason to flame anybody who asks a question in this group. They deserve the answers they ask for without all that. After all, this is comp.unix.questions, isn't it( cross postings excepted ) ? SJO -- Steve Owens @ Micropen, Inc. Pittsford, N.Y. 14534 ...!{ames|harvard|rutgers|topaz|...}!rochester!ur-valhala!micropen!steve