#!/bin/sh
for f in "$@"
do
  mgt -s $f <<EOF >/dev/null
w*
qy

EOF
done
