[comp.unix.shell] Wanted: way to look for file names without certain suffixes

lwv27@CAS.BITNET (Larry W. Virden ext. 2487) (05/25/91)

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