#!/bin/sh

for file in $@
do
  head=`expr ${file} : '\([[:print:]]*\)\.f'`
  echo $head.f
  ftidy $file
  mv $head.f $head.old
  mv $head.tid $head.f
done
