#!/bin/sh if [ ! -f $1.dat ]; then echo "No such file - $1.dat - exiting!!" exit fi #if -e FOR006 goto warning cp $1.dat FOR005 echo "Mopac job $1 started" mopac.m mv FOR006 $1.out mv FOR012 $1.arc rm FOR0* SHUTDOWN echo "Mopac job $1 has finished" exit warning: # there are allready some FOR0?? files in working directory # echo ' There are some FOR0?? files in working directory.' echo ' It is possible, that you are trying to run several Mopac jobs' echo ' in the same directory simultaneously. This is not possible however.' echo ' If it's not the case remove existing FOR0?? files. Good luck!' exit