more generic batch.sh