Try /usr/bin/ofgwrite -r -k /tmp/formuler1

If that doesn't work then neither will the script.