#!/bin/ksh

if [ $# -gt 0 ]
then
 for file in $*
  do
   if [ ! -f $file ]
   then
    echo "#!/bin/ksh" > $file
    echo "#FILE: $1"
    chmod +x $file
   fi
  done
 vi $*
else
 { 
  echo "\nUsage: $0 <filename> [filename,...]"
  echo "$0 will create <filename> if it doesn't exist,"
  echo "placing #!/bin/ksh as the first line and make"
  echo "it executable with the chmod +x command,then vi it.\n"
 } 1>&2
fi
