if [ $# -eq 0 ]; then
  set setup.csh setup.sh
fi

xs=0
for f; do
  grep '/afs/\.' "$f">/dev/null || { [ $? -eq 1 ] || xs=`expr $xs + 1`; continue; }
  sed 's,/afs/\.,/afs/,g' "$f" >"${f}.new" || { xs=`expr $xs + 1`; continue; }
  mv -f "${f}.new" "${f}" || { xs=`expr $xs + 1`; continue; }
done

exit $xs
