trying to do some operations on all the files in the directory that end in .c (C files). The code is:
#!/bin/sh
clear
for file in *
do
if [ $file="*.c" ]
then
echo $file
fi
done
exit 0
doesn't work. it just lists all the files and directories.