Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!CAS.BITNET!lwv27 From: lwv27@CAS.BITNET (Larry W. Virden ext. 2487) Newsgroups: comp.unix.shell Subject: Wanted: way to look for file names without certain suffixes Message-ID: <9105250518.AA14779@cas.org> Date: 25 May 91 09:18:15 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 18 I am trying to figure out a way to find all files which do have, for instance, a .c but do not have a .o. I can do something like: #! /bin/ksh lst=$(ls *.c) for i in $lst ; do if [ ! -f ${i%%.c}.o ] ; then echo $i fi done but I was wondering if I am missing something easier? -- Larry W. Virden UUCP: osu-cis!chemabs!lwv27 Same Mbox: BITNET: lwv27@cas INET: lwv27%cas.BITNET@CUNYVM.CUNY.Edu Personal: 674 Falls Place, Reynoldsburg,OH 43068-1614 America Online: lvirden