delete C files

A script that behaves both in interactive and nonineractive mode. When no arguments are supplied, it picks up each C program(Files with .c extension) from the current directory and lists the first 10 lines. It then prompts for deletion of the file. If the user supplies arguments with the script, it works on those files only.

The code is not tested.

#! /usr/bin/bash
if [ "$1" = "" ] ; then
  for i in `ls *.c`
  do
     echo "display first 10 lines of $i"
     head -10 $i
     printf " Do you want to delete the file $i [y]?  " 
     read ANSWER
     if [ x"$ANSWER" = x"y" ]; then 
         rm $i
     fi
  done
else
    #work on $1
fi