Path: utzoo!utgpu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!rutgers!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: alt.sources.d Subject: Re: Multiple executables in path (Was: NON-SOURCE POSTINGS CONSIDERED HARMFUL!) Message-ID: <24284:Jan2517:16:0491@kramden.acf.nyu.edu> Date: 25 Jan 91 17:16:04 GMT References: <5648@idunno.Princeton.EDU> <17501:Jan2414:21:3991@kramden.acf.nyu.edu> <1991Jan25.080151.11595@convex.com> Organization: IR Lines: 40 In article <1991Jan25.080151.11595@convex.com> tchrist@convex.COM (Tom Christiansen) writes: > From the keyboard of brnstnd@kramden.acf.nyu.edu (Dan Bernstein): > :Ya want other behaviors? Fine, ya get other behaviors. These all use the > :same strategy as the original. > [ many nice pipe examples that no novice will ever decipher. ] Who tf cares? Maybe you have novices maintaining your software at Convex, but I don't really care whether a solution is obvious or even comprehensible to novices. It's much more important that people be able to understand the interface. > :> But Tom's solution can easily be changed to have either behavior. > :So what? So can any reasonable solution. > And your solution, Dan, has not yet been proven to be such. Huh? Non sequitur. What does program proving have to do with whether a program can be changed to give a different behavior? > Leave the > programming langauge at sh if it will eliminate an irrevlant complaint of > yours. Huh? Wtf is irrevlant? Can anyone understand that sentence? > To say "for each dir in path, print the pathname if > there is an exececutable file of the target name there" is much easier to > grok. Huh? Much easier than what? My solution translates as ``Add the target name to every dir in path, glob to select only the files that exist, print.'' So you're working one element at a time while I'm working with the entire set of directories at once. This isn't a real difference. > Take both to a novice and ask their opinion on this. I > challenge you. I don't know any UNIX novices who've learned test yet, and your solution depends on -x. What do you mean by a novice? ---Dan