Wanted: way to look for file names without certain suffixes
Larry W. Virden ext. 2487
lwv27 at CAS.BITNET
Sat May 25 19:18:15 AEST 1991
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 at cas INET: lwv27%cas.BITNET at CUNYVM.CUNY.Edu
Personal: 674 Falls Place, Reynoldsburg,OH 43068-1614
America Online: lvirden
More information about the Comp.unix.shell
mailing list